@wirecat/drive-cli 0.69.0 → 0.71.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 (228) hide show
  1. package/README.md +3 -2
  2. package/contracts/wirecat.json +14 -13
  3. package/dist/age.d.ts +0 -36
  4. package/dist/age.d.ts.map +1 -1
  5. package/dist/age.js +0 -22
  6. package/dist/age.js.map +1 -1
  7. package/dist/bin/drive.js +2 -2
  8. package/dist/bundle/{all-profiles-B4A737YW.js → all-profiles-3QJG2NAN.js} +13 -13
  9. package/dist/bundle/{anthropic-RZGPDESM.js → anthropic-PSWTEU6G.js} +8 -8
  10. package/dist/bundle/{app-server-OWEW7DY5.js → app-server-PVTA6ABR.js} +66 -58
  11. package/dist/bundle/{bun-V5QLYBZU.js → bun-LU5LP3JI.js} +2 -2
  12. package/dist/bundle/{bun-sqlite-KHLHXXGH.js → bun-sqlite-PYMKLBRU.js} +9 -9
  13. package/dist/bundle/{chunk-CAQ5GW3A.js → chunk-22QQUKWA.js} +1 -1
  14. package/dist/bundle/{chunk-3YKAFLXY.js → chunk-26DHFMGZ.js} +2 -2
  15. package/dist/bundle/{chunk-Y2QVNVHK.js → chunk-2BVVU7GG.js} +1 -1
  16. package/dist/bundle/{chunk-7JKECODO.js → chunk-2LHAVY4U.js} +1 -11
  17. package/dist/bundle/{chunk-HEBZCKMU.js → chunk-2PUNKUYJ.js} +4389 -4709
  18. package/dist/bundle/chunk-2UUWXPOB.js +31 -0
  19. package/dist/bundle/{chunk-KUQDBWPU.js → chunk-35SCQ4VI.js} +31 -32
  20. package/dist/bundle/{chunk-O6PD7RZY.js → chunk-3EBBLKIT.js} +4 -4
  21. package/dist/bundle/{chunk-PV3AWPHR.js → chunk-3N2OFXB5.js} +5 -5
  22. package/dist/bundle/{chunk-SY2HLH5R.js → chunk-3UGYFXH6.js} +82 -25
  23. package/dist/bundle/{chunk-OUM4ZO53.js → chunk-4HWJOU7N.js} +1 -1
  24. package/dist/bundle/{chunk-6D44YQ5X.js → chunk-4PA4DHYV.js} +6 -6
  25. package/dist/bundle/{chunk-EA2OB75T.js → chunk-4QNW4NK6.js} +1 -1
  26. package/dist/bundle/{chunk-GK6KXBL6.js → chunk-6SJOTNHF.js} +4 -4
  27. package/dist/bundle/{chunk-NVDR72GP.js → chunk-6TNNT2MQ.js} +250 -174
  28. package/dist/bundle/{chunk-4YECZ6CN.js → chunk-6W763DZN.js} +12 -12
  29. package/dist/bundle/{chunk-IQ2QU2X6.js → chunk-6XFIITOG.js} +1024 -598
  30. package/dist/bundle/{chunk-AD7VI3XU.js → chunk-72C4YOCH.js} +7 -7
  31. package/dist/bundle/{chunk-6EL5AVXX.js → chunk-7PDHGZN4.js} +4 -4
  32. package/dist/bundle/{chunk-22SH77TG.js → chunk-ACUAV6VX.js} +64 -64
  33. package/dist/bundle/{chunk-BBJVV4E2.js → chunk-ASMMG72J.js} +68 -38
  34. package/dist/bundle/{chunk-XUHQ7DVT.js → chunk-B5KSXHJ7.js} +1 -1
  35. package/dist/bundle/{chunk-BVVXYZSU.js → chunk-BKSQBBYG.js} +9 -9
  36. package/dist/bundle/{chunk-5SJZDEIO.js → chunk-CJLVYIOP.js} +21 -21
  37. package/dist/bundle/chunk-COJSWDNU.js +170 -0
  38. package/dist/bundle/{chunk-GTDCP5OG.js → chunk-COOOO5B3.js} +4 -4
  39. package/dist/bundle/{chunk-LUZRVBQR.js → chunk-D5TGYUVU.js} +6 -6
  40. package/dist/bundle/{chunk-CZ4UEXCE.js → chunk-EOEU3AZN.js} +6 -6
  41. package/dist/bundle/{chunk-CU6RATZH.js → chunk-FCS26CYQ.js} +4 -4
  42. package/dist/bundle/{chunk-LRCSDAYK.js → chunk-FJH7DJWK.js} +4 -4
  43. package/dist/bundle/{chunk-U3RXH6RY.js → chunk-FP54WSIR.js} +4 -4
  44. package/dist/bundle/{chunk-3URYKAJP.js → chunk-FT3LN3HP.js} +1 -1
  45. package/dist/bundle/{chunk-CDSB7WVG.js → chunk-GBKNJWOZ.js} +8 -8
  46. package/dist/bundle/{chunk-4J5GJJ2I.js → chunk-GOWXXYEF.js} +2 -2
  47. package/dist/bundle/{chunk-PB6NWKH3.js → chunk-GPQ44Y2R.js} +2 -2
  48. package/dist/bundle/{chunk-E7URRFBB.js → chunk-GZ2D4KXG.js} +10 -15
  49. package/dist/bundle/{chunk-376ZGVUZ.js → chunk-HKY7X6NY.js} +4 -4
  50. package/dist/bundle/{chunk-6XNTELM5.js → chunk-HL52XXZX.js} +1 -1
  51. package/dist/bundle/{chunk-533XOW74.js → chunk-HMS6EEQL.js} +3 -3
  52. package/dist/bundle/{chunk-F5UUJU6R.js → chunk-I4RWW3UD.js} +49 -4
  53. package/dist/bundle/{chunk-TZ75K6R7.js → chunk-ICDCAQ6K.js} +8 -8
  54. package/dist/bundle/{chunk-WOUIHZRI.js → chunk-J5Q5FS2N.js} +18 -75
  55. package/dist/bundle/{chunk-EL2E3ABX.js → chunk-JDV7HNNQ.js} +13 -13
  56. package/dist/bundle/{chunk-ZUG67442.js → chunk-JZHBZOJR.js} +3 -3
  57. package/dist/bundle/{chunk-SEJBS7SI.js → chunk-KGERXYTV.js} +1 -1
  58. package/dist/bundle/{chunk-5TK2YQCO.js → chunk-KGYVHPGE.js} +2 -2
  59. package/dist/bundle/{chunk-HCZYJMBP.js → chunk-KYKW2W6X.js} +1 -1
  60. package/dist/bundle/{chunk-RLGQMMYE.js → chunk-L46C6HQ7.js} +35 -13
  61. package/dist/bundle/chunk-LXKYKRHD.js +387 -0
  62. package/dist/bundle/{chunk-N4ACIIQB.js → chunk-MIA7P6FZ.js} +2 -2
  63. package/dist/bundle/{chunk-ZBYKCVSV.js → chunk-MNLL5YLM.js} +2 -2
  64. package/dist/bundle/{chunk-UPCEHSIZ.js → chunk-OF422U5D.js} +21 -16
  65. package/dist/bundle/{chunk-JRFKCYMW.js → chunk-OJSBWP3F.js} +23 -6
  66. package/dist/bundle/{chunk-MHXZ62CU.js → chunk-P7CUM5IB.js} +1 -1
  67. package/dist/bundle/{chunk-I55XYREN.js → chunk-PRW6SYA3.js} +1094 -2526
  68. package/dist/bundle/chunk-Q7DOMFJ4.js +259 -0
  69. package/dist/bundle/{chunk-3RLRJHAI.js → chunk-QETR5HIZ.js} +12081 -12607
  70. package/dist/bundle/{chunk-QJGFQRTL.js → chunk-QFR2PNJN.js} +12 -12
  71. package/dist/bundle/{chunk-2Q4CB4EI.js → chunk-QNRRK3CN.js} +2 -2
  72. package/dist/bundle/{chunk-5B5NOAIA.js → chunk-QXC6IEH6.js} +45 -45
  73. package/dist/bundle/{chunk-T6X6EZ5N.js → chunk-RESDD3Q4.js} +3 -3
  74. package/dist/bundle/chunk-RJOQH5YY.js +1979 -0
  75. package/dist/bundle/{chunk-AMQGKMLZ.js → chunk-RWDKMU74.js} +3 -3
  76. package/dist/bundle/{chunk-VUPWDCYV.js → chunk-SAKO3P4H.js} +1 -1
  77. package/dist/bundle/{chunk-GHFBT2ZM.js → chunk-SDKQNOL5.js} +6 -6
  78. package/dist/bundle/{chunk-25FT44S3.js → chunk-SERXSCN3.js} +287 -569
  79. package/dist/bundle/{chunk-2DS2TDGW.js → chunk-TAFHYHKA.js} +20 -118
  80. package/dist/bundle/{chunk-XVH3WZSZ.js → chunk-TAUBRNC5.js} +53 -53
  81. package/dist/bundle/{chunk-2VFAXC6O.js → chunk-UDMNY63V.js} +22 -19
  82. package/dist/bundle/{chunk-EWUQIUTB.js → chunk-UTO2GO4P.js} +5 -5
  83. package/dist/bundle/{chunk-V4FMN5A6.js → chunk-WVDCCYS3.js} +17 -17
  84. package/dist/bundle/chunk-X4TIMMKJ.js +16 -0
  85. package/dist/bundle/chunk-XF4EXO2C.js +335 -0
  86. package/dist/bundle/{chunk-OOIAJRKQ.js → chunk-XMMFBPGC.js} +2 -2
  87. package/dist/bundle/{chunk-4ZFO2CVH.js → chunk-Y2NWGNUB.js} +5 -5
  88. package/dist/bundle/{chunk-IJCUAKR5.js → chunk-YJIGGUPI.js} +4 -4
  89. package/dist/bundle/{chunk-L342KHIZ.js → chunk-YMJ6IDGT.js} +6 -6
  90. package/dist/bundle/{chunk-WNMPIRRF.js → chunk-YPFWNVHV.js} +3 -3
  91. package/dist/bundle/{chunk-T4FMXDDV.js → chunk-YPNWIB6H.js} +3 -3
  92. package/dist/bundle/{chunk-FIVFP53N.js → chunk-YVI5SQPY.js} +1 -1
  93. package/dist/bundle/{chunk-RWQ7T4Y5.js → chunk-Z3KUSRCF.js} +2 -2
  94. package/dist/bundle/{chunk-WQOGHND4.js → chunk-Z56QFOBR.js} +1 -1
  95. package/dist/bundle/chunk-ZCR3IRZ2.js +823 -0
  96. package/dist/bundle/{chunk-SYUXKV2E.js → chunk-ZM63SUHG.js} +2 -2
  97. package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-ZZ32DXTH.js} +1 -1
  98. package/dist/bundle/{cli-BS4L3HAP.js → cli-556DERZL.js} +88 -69
  99. package/dist/bundle/command-contract-VRTOAV6W.js +43 -0
  100. package/dist/bundle/{command-server-entry-CJ2CV7ZV.js → command-server-entry-AYLGNZWD.js} +33 -30
  101. package/dist/bundle/decode-QU24MWMN.js +299 -0
  102. package/dist/bundle/{dispatch-WBEOHZDV.js → dispatch-4KODNOXV.js} +9 -9
  103. package/dist/bundle/drive.js +11 -11
  104. package/dist/bundle/{echarts-QIXLXS3G.js → echarts-BXX4OQWC.js} +2 -2
  105. package/dist/bundle/{embed-YNZW5X6M.js → embed-KG27KG3D.js} +9 -9
  106. package/dist/bundle/{embedder-LRC2PKTS.js → embedder-IPAVUQUV.js} +12 -12
  107. package/dist/bundle/entry-MVXQETWS.js +25 -0
  108. package/dist/bundle/{failure-X6PSLVSO.js → failure-ESL7ETL4.js} +4 -4
  109. package/dist/bundle/first-run-4UVLW2WR.js +31 -0
  110. package/dist/bundle/first-screen-JAKAIINI.js +41 -0
  111. package/dist/bundle/google-22NXXJX5.js +45 -0
  112. package/dist/bundle/{google-api-7JDZDCWE.js → google-api-VCDBSNOW.js} +70 -62
  113. package/dist/bundle/grants-MQMTVCRQ.js +118 -0
  114. package/dist/bundle/{identity-E43WKN5F.js → identity-LOWMVGZY.js} +6 -6
  115. package/dist/bundle/{instructions-MD2RZT5Z.js → instructions-2VECIDXF.js} +1 -1
  116. package/dist/bundle/{login-RBDJPQAG.js → login-7GBONT7V.js} +78 -70
  117. package/dist/bundle/{mcp-TDKGDB4V.js → mcp-O6ACR2DX.js} +2 -2
  118. package/dist/bundle/meeting-combined-LVP4AZKA.js +27 -0
  119. package/dist/bundle/meeting-model-RAY5XDXZ.js +29 -0
  120. package/dist/bundle/meeting-semantic-G7PFOKU7.js +25 -0
  121. package/dist/bundle/{node-IEVT2FSJ.js → node-MPEQSFI3.js} +2 -2
  122. package/dist/bundle/{node-sqlite-IENH4TRX.js → node-sqlite-OLQMAYB4.js} +10 -10
  123. package/dist/bundle/oauth-SGH2I2BY.js +22 -0
  124. package/dist/bundle/{open-TZ5H7NYM.js → open-OXTE672W.js} +8 -8
  125. package/dist/bundle/{openai-XF2KB7W2.js → openai-EB3TPIZY.js} +32 -30
  126. package/dist/bundle/{process-6Q23D3TO.js → process-F6TKXWWA.js} +1 -1
  127. package/dist/bundle/{program-D5XWOHV5.js → program-4IFDZ7FM.js} +1356 -1338
  128. package/dist/bundle/{prompt-KUC5D4GX.js → prompt-F5RRHPN2.js} +8 -8
  129. package/dist/bundle/{reasons-KSYP5VDJ.js → reasons-UORHJDHK.js} +5 -5
  130. package/dist/bundle/{recognize-DPFW7HO3.js → recognize-DAVNZND3.js} +7 -7
  131. package/dist/bundle/{remote-MODTSUNH.js → remote-D5EYYIAU.js} +13 -13
  132. package/dist/bundle/{rerank-JK7SERLE.js → rerank-CND2GVLZ.js} +10 -10
  133. package/dist/bundle/{serve-BV2WHZLW.js → serve-ZHSPUIGX.js} +12 -12
  134. package/dist/bundle/server-DUVJWP3Q.js +80 -0
  135. package/dist/bundle/{server-N3WPEU7Z.js → server-YMAK4LHC.js} +54 -46
  136. package/dist/bundle/{services-SV6CFUCS.js → services-ZILSFJ6E.js} +79 -54
  137. package/dist/bundle/{sqlite-runtime-RZ5PLZVQ.js → sqlite-runtime-S5VPMZQH.js} +9 -9
  138. package/dist/bundle/{start-C6EXYXAL.js → start-CR6X25RT.js} +7 -7
  139. package/dist/bundle/{state-RAZIREVG.js → state-YFPHVIIJ.js} +9 -9
  140. package/dist/bundle/{store-DQKJKX2G.js → store-CL4ZJZRI.js} +23 -19
  141. package/dist/bundle/{store-2DLGLYS6.js → store-UODRT6X4.js} +31 -26
  142. package/dist/bundle/store-maintenance-command-DY5XIBWR.js +72 -0
  143. package/dist/bundle/tokens-AF7QOFOF.js +118 -0
  144. package/dist/catalog.d.ts +0 -28
  145. package/dist/catalog.d.ts.map +1 -1
  146. package/dist/catalog.js +0 -82
  147. package/dist/catalog.js.map +1 -1
  148. package/dist/commands/catalog.d.ts +3 -8
  149. package/dist/commands/catalog.d.ts.map +1 -1
  150. package/dist/commands/catalog.js +36 -109
  151. package/dist/commands/catalog.js.map +1 -1
  152. package/dist/commands/context.d.ts +3 -0
  153. package/dist/commands/context.d.ts.map +1 -1
  154. package/dist/commands/context.js +20 -0
  155. package/dist/commands/context.js.map +1 -1
  156. package/dist/commands/documents.d.ts.map +1 -1
  157. package/dist/commands/documents.js +30 -72
  158. package/dist/commands/documents.js.map +1 -1
  159. package/dist/commands/folders.d.ts +1 -1
  160. package/dist/commands/folders.d.ts.map +1 -1
  161. package/dist/commands/folders.js +45 -48
  162. package/dist/commands/folders.js.map +1 -1
  163. package/dist/commands/knowledge.d.ts +4 -21
  164. package/dist/commands/knowledge.d.ts.map +1 -1
  165. package/dist/commands/knowledge.js +3 -241
  166. package/dist/commands/knowledge.js.map +1 -1
  167. package/dist/commands/mirrors.d.ts +2 -2
  168. package/dist/commands/mirrors.d.ts.map +1 -1
  169. package/dist/commands/mirrors.js +46 -202
  170. package/dist/commands/mirrors.js.map +1 -1
  171. package/dist/commands/search.d.ts +1 -3
  172. package/dist/commands/search.d.ts.map +1 -1
  173. package/dist/commands/search.js +20 -42
  174. package/dist/commands/search.js.map +1 -1
  175. package/dist/commands/sync.d.ts.map +1 -1
  176. package/dist/commands/sync.js +36 -53
  177. package/dist/commands/sync.js.map +1 -1
  178. package/dist/config.d.ts.map +1 -1
  179. package/dist/config.js +2 -1
  180. package/dist/config.js.map +1 -1
  181. package/dist/contract-overrides.d.ts +0 -2
  182. package/dist/contract-overrides.d.ts.map +1 -1
  183. package/dist/contract-overrides.js +0 -317
  184. package/dist/contract-overrides.js.map +1 -1
  185. package/dist/knowledge.d.ts +1 -1
  186. package/dist/knowledge.d.ts.map +1 -1
  187. package/dist/knowledge.js +4 -3
  188. package/dist/knowledge.js.map +1 -1
  189. package/dist/list-queries.d.ts +0 -31
  190. package/dist/list-queries.d.ts.map +1 -1
  191. package/dist/list-queries.js +0 -36
  192. package/dist/list-queries.js.map +1 -1
  193. package/dist/program.d.ts.map +1 -1
  194. package/dist/program.js +2 -3
  195. package/dist/program.js.map +1 -1
  196. package/dist/provider-json.d.ts.map +1 -1
  197. package/dist/provider-json.js +5 -5
  198. package/dist/provider-json.js.map +1 -1
  199. package/dist/reasons.d.ts.map +1 -1
  200. package/dist/reasons.js +0 -10
  201. package/dist/reasons.js.map +1 -1
  202. package/dist/sync.d.ts.map +1 -1
  203. package/dist/sync.js +1 -2
  204. package/dist/sync.js.map +1 -1
  205. package/dist/transcripts.d.ts +0 -6
  206. package/dist/transcripts.d.ts.map +1 -1
  207. package/dist/transcripts.js +0 -13
  208. package/dist/transcripts.js.map +1 -1
  209. package/dist/version.d.ts +1 -1
  210. package/dist/version.js +1 -1
  211. package/package.json +3 -3
  212. package/dist/bundle/command-contract-HYURWSD6.js +0 -40
  213. package/dist/bundle/decode-E2NM5SSM.js +0 -165
  214. package/dist/bundle/entry-2IMSWRJU.js +0 -25
  215. package/dist/bundle/first-run-7CPHQDM5.js +0 -30
  216. package/dist/bundle/first-screen-OKZ7GMFR.js +0 -38
  217. package/dist/bundle/google-WDKDBDD4.js +0 -45
  218. package/dist/bundle/grants-AU25GWKF.js +0 -110
  219. package/dist/bundle/oauth-3JGSN47Z.js +0 -22
  220. package/dist/bundle/server-6YDI4Y36.js +0 -72
  221. package/dist/bundle/store-maintenance-command-UJ5F5L4H.js +0 -64
  222. package/dist/bundle/tokens-LY3WML55.js +0 -110
  223. package/dist/knowledge-query.d.ts +0 -77
  224. package/dist/knowledge-query.d.ts.map +0 -1
  225. package/dist/knowledge-query.js +0 -104
  226. package/dist/knowledge-query.js.map +0 -1
  227. package/dist/bundle/{chunk-XWBPP2HX.js → chunk-VKE77B3F.js} +0 -0
  228. package/dist/bundle/{mdast-util-from-markdown-CE73EWJ2.js → mdast-util-from-markdown-FXEPSNER.js} +3 -3
@@ -0,0 +1,387 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ validateVector
5
+ } from "./chunk-COJSWDNU.js";
6
+ import {
7
+ meaningFloor
8
+ } from "./chunk-XF4EXO2C.js";
9
+ import {
10
+ MESSAGE_PARSING,
11
+ RRF_K,
12
+ plainQuery
13
+ } from "./chunk-ZCR3IRZ2.js";
14
+ import {
15
+ normalize
16
+ } from "./chunk-X4TIMMKJ.js";
17
+ import {
18
+ MEETING_FIELD_NAMES,
19
+ formatMeetingReference,
20
+ liftMeetingFields,
21
+ parseMeetingReference
22
+ } from "./chunk-PRW6SYA3.js";
23
+ import {
24
+ implicitTextTerms,
25
+ parseLucene,
26
+ walkQuery
27
+ } from "./chunk-OF422U5D.js";
28
+ import {
29
+ CliError
30
+ } from "./chunk-4QNW4NK6.js";
31
+ import {
32
+ __name
33
+ } from "./chunk-ZVVMGPBJ.js";
34
+
35
+ // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
36
+ import { createHash } from "node:crypto";
37
+
38
+ // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/search/question-plan.js
39
+ var words = /* @__PURE__ */ __name((text) => normalize(text).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
40
+ var joinedHyphens = /* @__PURE__ */ __name((text) => (normalize(text).match(new RegExp("(?<![:\\p{L}\\p{N}-])\\p{L}[\\p{L}\\p{N}]*(?:-\\p{L}[\\p{L}\\p{N}]*)+", "gu")) ?? []).map((word) => word.replaceAll("-", "")), "joinedHyphens");
41
+ var scaffolding = new Set(words("what which how many much who where when is are was were do does did can could should we the a an for of to under from in on at has have \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u043E\u0435 \u043A\u0442\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u0447\u0442\u043E \u0432\u043E \u043F\u043E \u043D\u0430 \u0432 \u043A \u0441 \u0443 \u0447\u0435\u0440\u0435\u0437 \u043B\u0438 \u0434\u043E\u043B\u0436\u0435\u043D \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0443\u0436\u043D\u043E \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u0442 \u043C\u043E\u0436\u043D\u043E \u043C\u043E\u0436\u0435\u0442 \u043C\u043E\u0433\u0443\u0442"));
42
+ var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
43
+ var QUESTION_STARTS = new Set(words("what which how who whom whose where when why can could should would did do does is are was were will \u0447\u0442\u043E \u043A\u0442\u043E \u043A\u043E\u0433\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u043E\u0435 \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u0443\u044E \u043A\u0430\u043A\u0438\u043C \u043A\u0430\u043A\u043E\u0433\u043E \u043A\u0430\u043A\u0438\u0445 \u043F\u043E\u0447\u0435\u043C\u0443 \u0437\u0430\u0447\u0435\u043C \u043E\u0442\u043A\u0443\u0434\u0430 \u043A\u0443\u0434\u0430 \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043B\u0438 \u043C\u043E\u0436\u043D\u043E \u0440\u0430\u0437\u0432\u0435 \u0447\u0435\u0439 \u0447\u044C\u044F \u0447\u044C\u0451 \u0447\u044C\u0438"));
44
+ var QUESTION_FILLER = new Set(words("about any did does why whom whose would will \u044D\u0442\u043E \u043C\u044B \u0432\u044B \u044F \u043E\u043D\u0438 \u043E\u043D \u043E\u043D\u0430 \u043E \u043E\u0431 \u043F\u0440\u043E \u043B\u0438"));
45
+ var LINKING = new Set(words("and or but not nor with without this that these those there their they them you your our its his her all any and for into onto over then than also just and \u043F\u0440\u0438 \u0434\u043B\u044F \u0431\u0435\u0437 \u043D\u0430\u0434 \u043F\u043E\u0434 \u0438\u043B\u0438 \u043B\u0438\u0431\u043E \u0435\u0433\u043E \u0435\u0451 \u0438\u0445 \u0432\u0441\u0435 \u0432\u0441\u0451 \u0443\u0436\u0435 \u0435\u0449\u0451 \u0442\u0430\u043A \u0442\u043E\u0436\u0435 \u0442\u0430\u043A\u0436\u0435 \u0431\u044B\u043B \u0431\u044B\u043B\u0430 \u0431\u044B\u043B\u0438 \u0431\u044B\u043B\u043E \u0431\u0443\u0434\u0435\u0442 \u044D\u0442\u043E \u044D\u0442\u0430 \u044D\u0442\u043E\u0442 \u044D\u0442\u0438 \u0442\u0430\u043C \u0442\u0443\u0442"));
46
+ var isFunctionWord = /* @__PURE__ */ __name((word) => scaffolding.has(word) || QUESTION_STARTS.has(word) || QUESTION_FILLER.has(word) || LINKING.has(word), "isFunctionWord");
47
+ var questionTerms = /* @__PURE__ */ __name((text) => /\?\s*$/u.test(text) || QUESTION_STARTS.has(words(text)[0] ?? "") ? words(text).filter((word) => !scaffolding.has(word) && !QUESTION_STARTS.has(word) && !QUESTION_FILLER.has(word)) : null, "questionTerms");
48
+ function planQuestion(text, strict = false) {
49
+ if (strict)
50
+ return {
51
+ changed: false,
52
+ natural: false,
53
+ queries: [text],
54
+ scope: "",
55
+ terms: words(text),
56
+ rankingTerms: words(text),
57
+ removed: [],
58
+ aliases: []
59
+ };
60
+ const inputAst = parseLucene(text, MESSAGE_PARSING);
61
+ const rawTextual = walkQuery(inputAst.root).filter((node) => node.field === "text" || node.field === "exact");
62
+ const body = rawTextual.map((node) => node.value).join(" ");
63
+ const prefix = words(body).slice(0, 2);
64
+ const questionPrefix = [
65
+ "what",
66
+ "which",
67
+ "how",
68
+ "who",
69
+ "where",
70
+ "when",
71
+ "can",
72
+ "could",
73
+ "should",
74
+ "\u0441\u043A\u043E\u043B\u044C\u043A\u043E",
75
+ "\u043A\u0430\u043A\u043E\u0438",
76
+ "\u043A\u0430\u043A\u0430\u044F",
77
+ "\u043A\u0430\u043A\u0438\u0435",
78
+ "\u043A\u0430\u043A\u043E\u0435",
79
+ "\u043A\u0442\u043E",
80
+ "\u043A\u043E\u043C\u0443",
81
+ "\u043A\u0435\u043C",
82
+ "\u0433\u0434\u0435",
83
+ "\u043A\u043E\u0433\u0434\u0430",
84
+ "\u043A\u0430\u043A",
85
+ "\u0447\u0442\u043E",
86
+ "\u043C\u043E\u0436\u043D\u043E",
87
+ "\u043C\u043E\u0436\u0435\u0442",
88
+ "\u043C\u043E\u0433\u0443\u0442"
89
+ ].includes(prefix[0] ?? "") || ["\u043A", "\u0432\u043E"].includes(prefix[0] ?? "") && ["\u043A\u043E\u043C\u0443", "\u0441\u043A\u043E\u043B\u044C\u043A\u043E"].includes(prefix[1] ?? "");
90
+ const natural = questionWord.test(body) && (/\?/u.test(body) || questionPrefix);
91
+ let cleaned = text;
92
+ if (natural && !text.includes("\\")) {
93
+ const last = rawTextual.at(-1);
94
+ const mark = (last?.span.end ?? 0) - 1;
95
+ if (last?.operator === "wildcard" && text[mark] === "?")
96
+ cleaned = text.slice(0, mark) + text.slice(mark + 1);
97
+ }
98
+ const ast = cleaned === text ? inputAst : parseLucene(cleaned, MESSAGE_PARSING);
99
+ const predicates = walkQuery(ast.root);
100
+ const textual = predicates.filter((p) => p.field === "text" || p.field === "exact");
101
+ const fields = predicates.filter((p) => p.field !== "text" && p.field !== "exact");
102
+ const scope = fields.map((p) => {
103
+ const raw = cleaned.slice(p.span.start, p.span.end);
104
+ return new RegExp(`^${p.field}[:=<>]`, "u").test(raw) ? raw : `${p.field}:${raw}`;
105
+ }).join(" ");
106
+ const bypass = strict || !natural || implicitTextTerms(cleaned).size === 0 || // A quoted single word is how `plainQuery` keeps `10:30` or `HH:MM` literal; it is no phrase the asker wrote.
107
+ textual.some((p) => !(p.operator === "term" || p.operator === "phrase" && !/\s/u.test(p.value)) || p.field === "exact");
108
+ if (bypass)
109
+ return {
110
+ changed: false,
111
+ natural: false,
112
+ queries: [text],
113
+ scope,
114
+ terms: textual.flatMap((p) => words(p.value)),
115
+ rankingTerms: textual.flatMap((p) => words(p.value)),
116
+ removed: [],
117
+ aliases: []
118
+ };
119
+ const original = textual.flatMap((p) => words(p.value));
120
+ const removed = original.filter((w) => scaffolding.has(w));
121
+ const terms = [...new Set(original.filter((w) => !scaffolding.has(w)))];
122
+ if (!terms.length)
123
+ return {
124
+ changed: false,
125
+ natural: true,
126
+ queries: [text],
127
+ scope,
128
+ terms,
129
+ rankingTerms: original,
130
+ removed,
131
+ aliases: []
132
+ };
133
+ const alias = [...terms];
134
+ const changes = [];
135
+ const replace = /* @__PURE__ */ __name((from, to) => {
136
+ for (let i = 0; i < alias.length; i++)
137
+ if (from.includes(alias[i] ?? "")) {
138
+ changes.push(`${alias[i]} -> ${to}`);
139
+ alias[i] = to;
140
+ }
141
+ }, "replace");
142
+ if (terms.some((w) => ["refund", "euros", "euro", "money", "\u0432\u043E\u0437\u0432\u0440\u0430\u0442\u0430", "\u0432\u043E\u0437\u0432\u0440\u0430\u0442", "\u0435\u0432\u0440\u043E"].includes(w))) {
143
+ replace(["returned", "refunded", "received"], "refund");
144
+ replace(["\u0432\u0435\u0440\u043D\u0443\u043B\u0438", "\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0435\u043D\u043E", "\u043F\u0435\u0440\u0435\u0447\u0438\u0441\u043B\u0435\u043D\u043E"], "\u0432\u043E\u0437\u0432\u0440\u0430\u0442");
145
+ }
146
+ if (terms.some((w) => ["log", "logs", "retention", "backup", "\u043B\u043E\u0433\u043E\u0432", "\u043B\u043E\u0433\u0438", "\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435", "\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u044F"].includes(w))) {
147
+ replace(["lifetime", "kept", "keep"], "retention");
148
+ replace(["\u0445\u0440\u0430\u043D\u044F\u0442\u0441\u044F", "\u0445\u0440\u0430\u043D\u044F\u0442", "\u0445\u0440\u0430\u043D\u0438\u0442\u044C", "\u0441\u0440\u043E\u043A"], "\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435");
149
+ }
150
+ if (terms.includes("service") || terms.includes("build"))
151
+ replace(["currently", "now"], "current");
152
+ const render = /* @__PURE__ */ __name((ws) => [...new Set(ws)].join(" ") + (scope ? ` ${scope}` : ""), "render");
153
+ const queries = [.../* @__PURE__ */ new Set([render(terms), render(alias)])].slice(0, 2);
154
+ return { changed: true, natural: true, queries, scope, terms, rankingTerms: original, removed, aliases: changes };
155
+ }
156
+ __name(planQuestion, "planQuestion");
157
+ var questionText = /* @__PURE__ */ __name((text) => text.replace(new RegExp("(?<=\\p{L})\\?(?=\\s|$)", "gu"), "").replace(/"(?:[^"\\]|\\.)*"|(?<=\d):(?=\d)/gu, (found) => found === ":" ? " " : found), "questionText");
158
+ var lookupTerms = /* @__PURE__ */ __name((plan) => [
159
+ ...new Set(plan.terms.concat(plan.aliases.flatMap((alias) => words(alias.split(" -> ")[1] ?? ""))))
160
+ ], "lookupTerms");
161
+ var anyOfTerms = /* @__PURE__ */ __name((terms, scope) => `(${terms.join(" OR ")})${scope ? ` ${scope}` : ""}`, "anyOfTerms");
162
+ var questionLookup = /* @__PURE__ */ __name((text) => {
163
+ let plan;
164
+ try {
165
+ plan = planQuestion(questionText(text));
166
+ } catch (error) {
167
+ if (error instanceof CliError)
168
+ return void 0;
169
+ throw error;
170
+ }
171
+ const terms = plan.changed ? lookupTerms(plan) : [];
172
+ return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
173
+ }, "questionLookup");
174
+
175
+ // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
176
+ var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
177
+ let before = Number.POSITIVE_INFINITY;
178
+ for (; ; ) {
179
+ signal?.throwIfAborted();
180
+ const { indexed, remaining } = await meetings.indexSearch({
181
+ accountId,
182
+ limit: 1e3,
183
+ maxReadBytes: 64 * 1024 ** 2,
184
+ signal
185
+ });
186
+ if (remaining === 0 || indexed === 0 || remaining >= before)
187
+ return;
188
+ before = remaining;
189
+ }
190
+ }, "refreshMeetingIndex");
191
+ var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
192
+ const { project, tag, topic, ...input } = request;
193
+ input.signal?.throwIfAborted();
194
+ if (project !== void 0 && input.projectId !== void 0 || [tag, topic].filter((value) => value !== void 0).length + Number(input.tagId !== void 0) > 1)
195
+ throw new CliError("validation_error", "choose one project selector and one tag or topic selector");
196
+ const selection = [];
197
+ const knowledge = store.knowledge;
198
+ if (!knowledge && [project, tag, topic].some((value) => value !== void 0))
199
+ throw new CliError("configuration_error", "this store cannot resolve project, tag or topic names");
200
+ for (const [kind, name] of [
201
+ ["project", project],
202
+ ["tag", tag],
203
+ ["topic", topic]
204
+ ]) {
205
+ if (name === void 0)
206
+ continue;
207
+ if (!knowledge)
208
+ continue;
209
+ const found = await knowledge.resolveVocabulary(name, { kind, signal: input.signal });
210
+ input.signal?.throwIfAborted();
211
+ if (found.ambiguous || found.matches.length !== 1)
212
+ throw new CliError(found.matches.length ? "validation_error" : "not_found", `the ${kind} name needs one canonical record`, {
213
+ candidates: found.matches.map((entry2) => ({ kind: entry2.kind, id: entry2.id, name: entry2.name }))
214
+ });
215
+ const entry = found.matches[0];
216
+ const id = Number(entry?.id);
217
+ if (!entry || entry.kind !== kind || !Number.isSafeInteger(id) || id < 1)
218
+ throw new CliError("invalid_response", "vocabulary resolution returned an invalid canonical record");
219
+ if (kind === "project")
220
+ input.projectId = id;
221
+ else
222
+ input.tagId = id;
223
+ selection.push({ kind, id, name: entry.name, by: "explicit-link" });
224
+ }
225
+ return { input, selection };
226
+ }, "resolveMeetingSelection");
227
+ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, options = {}) => {
228
+ const lifted = liftMeetingFields(plainQuery(query, MEETING_FIELD_NAMES), request);
229
+ const { input, selection } = await resolveMeetingSelection(store, lifted.request);
230
+ if (options.refreshIndex !== false)
231
+ await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
232
+ const result = await store.meetings.searchHits(lifted.query, input);
233
+ input.signal?.throwIfAborted();
234
+ return { ...result, selection };
235
+ }, "searchMeetingHits");
236
+
237
+ // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
238
+ var DEPTH = 200;
239
+ var cursorOf = /* @__PURE__ */ __name((value, key) => {
240
+ if (value === void 0)
241
+ return 0;
242
+ let cursor;
243
+ try {
244
+ cursor = JSON.parse(Buffer.from(value, "base64url").toString("utf8"));
245
+ } catch {
246
+ throw new CliError("validation_error", "the cursor is not from a combined meeting search; search again");
247
+ }
248
+ if (cursor?.version !== 1 || cursor.key !== key || !Number.isSafeInteger(cursor.offset) || cursor.offset < 0)
249
+ throw new CliError("validation_error", "the cursor belongs to another query, filter or model; search again");
250
+ return cursor.offset;
251
+ }, "cursorOf");
252
+ var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, typed, request) => {
253
+ const { maxChunks, maxRows, maxTextBytes, ...chosen } = request;
254
+ const { query, request: words2 } = liftMeetingFields(typed, chosen);
255
+ const { input, selection } = await resolveMeetingSelection(store, words2);
256
+ const { after, limit = 20, maxReadBytes, ...filters } = input;
257
+ const terms = questionTerms(query);
258
+ const wordQuery = terms === null ? query : terms.join(" ");
259
+ const key = createHash("sha256").update(JSON.stringify([query, embedder.key, Object.entries(filters).filter(([name]) => name !== "signal")])).digest("base64url");
260
+ const offset = cursorOf(after, key);
261
+ let byWords = [];
262
+ let indexing = "ready";
263
+ let refused;
264
+ if (wordQuery.trim()) {
265
+ await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
266
+ try {
267
+ const page = await store.meetings.searchHits(wordQuery, { ...filters, limit: DEPTH, maxReadBytes });
268
+ byWords = page.items;
269
+ indexing = page.coverage.indexing;
270
+ } catch (error) {
271
+ if (!(error instanceof CliError) || error.code !== "validation_error")
272
+ throw error;
273
+ refused = error.message;
274
+ }
275
+ }
276
+ input.signal?.throwIfAborted();
277
+ const vectors = await embedder.embed([query], "query");
278
+ if (vectors.length !== 1)
279
+ throw new CliError("invalid_response", "Meeting query model returned another vector count");
280
+ const vector = vectors[0];
281
+ const ranked = await store.meetingVectors.ranked(embedder.key, validateVector(vector, embedder.dims), {
282
+ ...filters,
283
+ limit: DEPTH,
284
+ ...maxChunks === void 0 ? {} : { maxChunks },
285
+ ...maxRows === void 0 ? {} : { maxRows },
286
+ ...maxTextBytes === void 0 ? {} : { maxTextBytes }
287
+ });
288
+ const floor = meaningFloor(embedder.key);
289
+ const byMeaning = ranked.items.filter(({ score }) => score > floor);
290
+ const merged = /* @__PURE__ */ new Map();
291
+ byMeaning.forEach((hit, rank) => {
292
+ const reference = { type: "meeting", accountId: input.accountId, meetingId: hit.meetingId };
293
+ const first = formatMeetingReference({
294
+ ...reference,
295
+ transcriptId: hit.transcriptId,
296
+ cuePosition: hit.firstPosition
297
+ });
298
+ merged.set(`${hit.transcriptId}:${hit.firstPosition}`, {
299
+ ref: first,
300
+ meetingId: hit.meetingId,
301
+ scope: "transcript",
302
+ text: hit.text,
303
+ startMs: null,
304
+ source: { title: hit.title, startedAt: hit.startedAt, url: null },
305
+ by: ["meaning"],
306
+ score: hit.score,
307
+ passage: {
308
+ first,
309
+ last: formatMeetingReference({ ...reference, transcriptId: hit.transcriptId, cuePosition: hit.lastPosition })
310
+ },
311
+ fused: 1 / (RRF_K + rank + 1)
312
+ });
313
+ });
314
+ byWords.forEach((hit, rank) => {
315
+ const share = 1 / (RRF_K + rank + 1);
316
+ const cue = hit.scope === "transcript" ? parseMeetingReference(hit.ref) : void 0;
317
+ const within = cue?.cuePosition === void 0 ? void 0 : byMeaning.find((passage) => passage.transcriptId === cue.transcriptId && passage.firstPosition <= cue.cuePosition && cue.cuePosition <= passage.lastPosition);
318
+ const held = within && merged.get(`${within.transcriptId}:${within.firstPosition}`);
319
+ const found = {
320
+ ref: hit.ref,
321
+ text: hit.text,
322
+ startMs: hit.startMs,
323
+ ...hit.match === void 0 ? {} : { match: hit.match },
324
+ ...hit.corrections === void 0 ? {} : { corrections: hit.corrections }
325
+ };
326
+ if (held && !held.by.includes("words")) {
327
+ Object.assign(held, found, { by: ["words", "meaning"], fused: held.fused + share });
328
+ if (hit.source?.url)
329
+ held.source.url = hit.source.url;
330
+ } else if (held)
331
+ held.fused += share;
332
+ else
333
+ merged.set(`w:${hit.ref}:${hit.scope}:${hit.id}`, {
334
+ ...found,
335
+ meetingId: hit.meetingId,
336
+ scope: hit.scope,
337
+ source: {
338
+ title: hit.source?.title ?? null,
339
+ startedAt: hit.source?.startedAt ?? null,
340
+ url: hit.source?.url ?? null
341
+ },
342
+ by: ["words"],
343
+ score: null,
344
+ fused: share
345
+ });
346
+ });
347
+ const ordered = [...merged.values()].sort((a, b) => b.fused - a.fused || Number(b.by.includes("words")) - Number(a.by.includes("words")) || (b.score ?? -2) - (a.score ?? -2));
348
+ const items = ordered.slice(offset, offset + limit).map(({ fused: _, ...hit }) => hit);
349
+ const hasMore = ordered.length > offset + limit;
350
+ return {
351
+ items,
352
+ hasMore,
353
+ nextCursor: hasMore ? Buffer.from(JSON.stringify({ version: 1, key, offset: offset + limit })).toString("base64url") : null,
354
+ selection,
355
+ words: {
356
+ query: wordQuery,
357
+ ...terms === null ? {} : { from: "question" },
358
+ ...refused === void 0 ? {} : { refused }
359
+ },
360
+ model: { key: embedder.key, model: embedder.model, kind: embedder.kind, dims: embedder.dims },
361
+ coverage: {
362
+ archiveCompleteness: "unknown",
363
+ indexCompleteness: "unknown",
364
+ indexing,
365
+ /** Every vector of the selection was compared; false when `maxChunks` stopped the scan. */
366
+ meaningScanComplete: ranked.complete,
367
+ scanned: ranked.scanned,
368
+ /** Each side ranks this many at most; pages past them hold nothing more. */
369
+ depth: DEPTH
370
+ }
371
+ };
372
+ }, "searchMeetingsCombined");
373
+
374
+ export {
375
+ words,
376
+ joinedHyphens,
377
+ isFunctionWord,
378
+ planQuestion,
379
+ questionText,
380
+ lookupTerms,
381
+ anyOfTerms,
382
+ questionLookup,
383
+ refreshMeetingIndex,
384
+ resolveMeetingSelection,
385
+ searchMeetingHits,
386
+ searchMeetingsCombined
387
+ };
@@ -8,12 +8,12 @@ import {
8
8
  ACCESS_SECONDS,
9
9
  REFRESH_SECONDS,
10
10
  readStored
11
- } from "./chunk-376ZGVUZ.js";
11
+ } from "./chunk-HKY7X6NY.js";
12
12
  import {
13
13
  __name
14
14
  } from "./chunk-ZVVMGPBJ.js";
15
15
 
16
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
16
+ // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
17
17
  import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
18
18
  import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  CliError
5
- } from "./chunk-EA2OB75T.js";
5
+ } from "./chunk-4QNW4NK6.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
9
9
 
10
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/ports/app.js
10
+ // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/ports/app.js
11
11
  import { readFileSync } from "node:fs";
12
12
  var envName = /* @__PURE__ */ __name((app, name) => `${app.envPrefix}_${name}`, "envName");
13
13
  var locking = /* @__PURE__ */ __name((value) => value !== void 0 && value.trim() !== "" && value !== "0", "locking");
@@ -19,16 +19,16 @@ import {
19
19
  reference,
20
20
  string,
21
21
  variant
22
- } from "./chunk-JRFKCYMW.js";
22
+ } from "./chunk-OJSBWP3F.js";
23
23
  import {
24
24
  CliError,
25
25
  isCliError
26
- } from "./chunk-EA2OB75T.js";
26
+ } from "./chunk-4QNW4NK6.js";
27
27
  import {
28
28
  __name
29
29
  } from "./chunk-ZVVMGPBJ.js";
30
30
 
31
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
31
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
32
32
  var QUERY_LIMITS = {
33
33
  bytes: 8192,
34
34
  depth: 32,
@@ -72,7 +72,7 @@ function queryError(reason, span, alternative, context = {}, details = {}) {
72
72
  __name(queryError, "queryError");
73
73
  var walkQuery = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? [node] : node.clauses.flatMap(({ node: node2 }) => walkQuery(node2)), "walkQuery");
74
74
 
75
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
75
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
76
76
  var timezoneOf = /* @__PURE__ */ __name((given) => {
77
77
  const zone = given ?? Intl.DateTimeFormat().resolvedOptions().timeZone ?? "UTC";
78
78
  try {
@@ -84,7 +84,7 @@ var timezoneOf = /* @__PURE__ */ __name((given) => {
84
84
  }, "timezoneOf");
85
85
  var calendar = /* @__PURE__ */ __name((value, span) => {
86
86
  if (!/^\d{4}-\d{2}-\d{2}$/u.test(value))
87
- queryError("query.invalid-date", span, "use an ISO date or a quoted timestamp with offset");
87
+ queryError("query.invalid-date", span, "use an ISO date such as 2026-10-01");
88
88
  const year = Number(value.slice(0, 4)), month = Number(value.slice(5, 7)), day = Number(value.slice(8, 10));
89
89
  const date = /* @__PURE__ */ new Date(0);
90
90
  date.setUTCFullYear(year, month - 1, day);
@@ -169,6 +169,7 @@ var zonedMoment = /* @__PURE__ */ __name((value, zone, span, { end = false } = {
169
169
  return time;
170
170
  }, "zonedMoment");
171
171
  var AGO = /^(\d+)(m|h|d)$/u;
172
+ var MOMENT = /^(\d{4}-\d{2}-\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/u;
172
173
  var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
173
174
  var dayOf = /* @__PURE__ */ __name((word, zone, now, span) => {
174
175
  const today = new Intl.DateTimeFormat("en-CA", {
@@ -197,11 +198,15 @@ var dateEndpoint = /* @__PURE__ */ __name((value, zone, side, inclusive, span, n
197
198
  time: dayBoundary(value, zone, side === "lower" ? !inclusive : inclusive, span),
198
199
  inclusive: side === "lower"
199
200
  };
200
- if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$/u.test(value))
201
- queryError("query.invalid-date", span, "use an ISO date, today, yesterday, 30m/2h/7d ago, or a quoted timestamp with offset");
202
- calendar(value.slice(0, 10), span);
203
- const time = Date.parse(value);
204
- if (!Number.isFinite(time) || Number(value.slice(11, 13)) > 23 || Number(value.slice(14, 16)) > 59 || Number(value.slice(17, 19)) > 59)
201
+ const [, day, hour, minute, second = "0", offset] = MOMENT.exec(value) ?? [];
202
+ if (day === void 0)
203
+ 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");
204
+ const moment = value.replace(" ", "T");
205
+ if (offset === void 0)
206
+ return { time: wallTime(moment, zone, span), inclusive };
207
+ calendar(day, span);
208
+ const time = Date.parse(moment);
209
+ if (!Number.isFinite(time) || Number(hour) > 23 || Number(minute) > 59 || Number(second) > 59)
205
210
  queryError("query.invalid-date", span);
206
211
  return { time, inclusive };
207
212
  }, "dateEndpoint");
@@ -217,7 +222,7 @@ var dateRange = /* @__PURE__ */ __name((lower, upper, lowerInclusive, upperInclu
217
222
  };
218
223
  }, "dateRange");
219
224
 
220
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
225
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
221
226
  var wordsOf = /* @__PURE__ */ __name((text) => text.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [], "wordsOf");
222
227
  var pattern = /* @__PURE__ */ __name((value) => new RegExp(`^${[...value].map((char) => char === "*" ? ".*" : char === "?" ? "." : char.replace(/[.+^${}()|[\]\\]/, "\\$&")).join("")}$`, "iu"), "pattern");
223
228
  var present = /* @__PURE__ */ __name((value) => value !== void 0 && value !== null && value !== "", "present");
@@ -272,7 +277,7 @@ var matches = /* @__PURE__ */ __name((node, item, byName, options) => {
272
277
  }, "matches");
273
278
  var evaluate = /* @__PURE__ */ __name((ast, fields, item, options = {}) => matches(ast.root, item, new Map(fields.map((field) => [field.name, field])), options), "evaluate");
274
279
 
275
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
280
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
276
281
  var FIELD_TYPES = ["kw", "txt", "enum", "num", "time", "bool", "ref"];
277
282
  var OPERATORS_BY_TYPE = {
278
283
  kw: ["term", "phrase", "wildcard"],
@@ -351,7 +356,7 @@ var queryFieldsOf = /* @__PURE__ */ __name((schema, annotations = {}) => {
351
356
  return [...own, ...relations, ...states];
352
357
  }, "queryFieldsOf");
353
358
 
354
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
359
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
355
360
  var shownOf = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "shownOf");
356
361
  var leftOut = /* @__PURE__ */ __name((fields) => fields.filter((field) => field.negatable).map((field) => field.name), "leftOut");
357
362
  var has = /* @__PURE__ */ __name((fields, operator) => fields.some((field) => field.operators.includes(operator)), "has");
@@ -388,7 +393,7 @@ var queryDescription = /* @__PURE__ */ __name((registry) => {
388
393
  return `${terms}; fields: ${fields.join(", ")}; e.g. ${shown[0]?.example ?? ""}${defaults}`;
389
394
  }, "queryDescription");
390
395
 
391
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
396
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
392
397
  var whitespace = /* @__PURE__ */ __name((c) => /[ \t\n\r\u3000]/u.test(c), "whitespace");
393
398
  var reserved = /* @__PURE__ */ new Set([
394
399
  "+",
@@ -697,7 +702,7 @@ var implicitTextTerms = /* @__PURE__ */ __name((text) => {
697
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] : []));
698
703
  }, "implicitTextTerms");
699
704
 
700
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
705
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
701
706
  var inContext = /* @__PURE__ */ __name((context, run) => {
702
707
  try {
703
708
  run();
@@ -772,7 +777,7 @@ var validateQuery = /* @__PURE__ */ __name((ast, registry, options = {}) => {
772
777
  }, "validateQuery");
773
778
  var fieldsNamed = /* @__PURE__ */ __name((ast) => new Set(walkQuery(ast.root).map((node) => node.field)), "fieldsNamed");
774
779
 
775
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
780
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
776
781
  var describeQuery = /* @__PURE__ */ __name((registry) => ({
777
782
  entity: registry.entity,
778
783
  backend: registry.backend,
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  errorCodes
5
- } from "./chunk-EA2OB75T.js";
5
+ } from "./chunk-4QNW4NK6.js";
6
6
  import {
7
7
  __name
8
8
  } from "./chunk-ZVVMGPBJ.js";
@@ -560,6 +560,22 @@ function custom(check$1, message$1) {
560
560
  }
561
561
  __name(custom, "custom");
562
562
  // @__NO_SIDE_EFFECTS__
563
+ function exactOptional(wrapped, default_) {
564
+ return _standardSchema({
565
+ kind: "schema",
566
+ type: "exact_optional",
567
+ reference: exactOptional,
568
+ expects: wrapped.expects,
569
+ async: false,
570
+ wrapped,
571
+ default: default_,
572
+ "~run"(dataset, config$1) {
573
+ return this.wrapped["~run"](dataset, config$1);
574
+ }
575
+ });
576
+ }
577
+ __name(exactOptional, "exactOptional");
578
+ // @__NO_SIDE_EFFECTS__
563
579
  function lazy(getter) {
564
580
  return _standardSchema({
565
581
  kind: "schema",
@@ -1306,7 +1322,7 @@ function unwrap(schema) {
1306
1322
  }
1307
1323
  __name(unwrap, "unwrap");
1308
1324
 
1309
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
1325
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
1310
1326
  var EFFECT_LEVELS = ["none", "read", "write"];
1311
1327
  var effectsSchema = strictObject({
1312
1328
  remote: picklist(EFFECT_LEVELS),
@@ -1943,7 +1959,7 @@ function toStandardJsonSchema(schema) {
1943
1959
  }
1944
1960
  __name(toStandardJsonSchema, "toStandardJsonSchema");
1945
1961
 
1946
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
1962
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
1947
1963
  var word = pipe(string(), regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/, "a lower-case word, words joined by -"));
1948
1964
  var SNAKE_CASE = /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/;
1949
1965
  var text = pipe(string(), regex(/\S/, "must not be empty"));
@@ -1985,7 +2001,7 @@ var fill = /* @__PURE__ */ __name((template, values) => template.replace(PLACEHO
1985
2001
  return String(value);
1986
2002
  }), "fill");
1987
2003
 
1988
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
2004
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
1989
2005
  var MAX_NEXT_STEPS = 2;
1990
2006
  var COMPACT_FLAG = "--compact";
1991
2007
  var isoTime = pipe(string(), isoTimestamp("an ISO 8601 time in UTC"), endsWith("Z", "an ISO 8601 time in UTC, ending in `Z`"));
@@ -2112,7 +2128,7 @@ var jsonlOf = /* @__PURE__ */ __name(({ items, page, meta }) => [
2112
2128
  JSON.stringify({ type: "end", complete: meta.complete, ...meta.issues ? { issues: meta.issues } : {}, page })
2113
2129
  ].join("\n"), "jsonlOf");
2114
2130
 
2115
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
2131
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
2116
2132
  var CRASH_CODE = "internal_error";
2117
2133
  var CRASH_REASON = "command.crashed";
2118
2134
  var errorObjectSchema = strictObject({
@@ -2205,7 +2221,7 @@ var BASE_REASONS = defineReasons([
2205
2221
  { reason: CRASH_REASON, code: CRASH_CODE, message: "the command failed; this is a bug", details: [] }
2206
2222
  ]);
2207
2223
 
2208
- // node_modules/.pnpm/@wirecat+cli-base@0.99.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
2224
+ // node_modules/.pnpm/@wirecat+cli-base@0.102.1_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
2209
2225
  var SAME_COMMAND = "*";
2210
2226
  var commandPath = pipe(string(), regex(/^[a-z][a-z0-9-]*( [a-z][a-z0-9-]*)*$/, "a command path such as `messages sync`"));
2211
2227
  var stepSchema = union([
@@ -2307,6 +2323,7 @@ export {
2307
2323
  array,
2308
2324
  boolean,
2309
2325
  custom,
2326
+ exactOptional,
2310
2327
  lazy,
2311
2328
  literal,
2312
2329
  looseObject,
@@ -4,7 +4,7 @@ import {
4
4
  __name
5
5
  } from "./chunk-ZVVMGPBJ.js";
6
6
 
7
- // node_modules/.pnpm/@wirecat+cli-core@0.662.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_b96f03b0a44798bffec19d0b8a7273db/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
7
+ // node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/cli/stdin-field.js
8
8
  var fields = /* @__PURE__ */ new WeakMap();
9
9
  var readsStdin = /* @__PURE__ */ __name((command, field) => {
10
10
  fields.set(command, field);