@unbrained/pm-cli 2026.7.5 → 2026.7.6

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 (825) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cli-bundle/chunks/activity-WJCGCYPU.js +18 -0
  3. package/dist/cli-bundle/chunks/activity-Z6QUAUSG.js +22 -0
  4. package/dist/cli-bundle/chunks/aggregate-BDM6EIAR.js +25 -0
  5. package/dist/cli-bundle/chunks/aggregate-VQ2DHU3S.js +21 -0
  6. package/dist/cli-bundle/chunks/append-BGML6VLD.js +19 -0
  7. package/dist/cli-bundle/chunks/append-RKJYPU74.js +15 -0
  8. package/dist/cli-bundle/chunks/chunk-22KBU3MW.js +57 -0
  9. package/dist/cli-bundle/chunks/chunk-24YG75HI.js +634 -0
  10. package/dist/cli-bundle/chunks/chunk-2XG4IZON.js +218 -0
  11. package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js +228 -0
  12. package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js +2330 -0
  13. package/dist/cli-bundle/chunks/chunk-3N6RRO2Q.js +808 -0
  14. package/dist/cli-bundle/chunks/chunk-3N6RRO2Q.js.map +7 -0
  15. package/dist/cli-bundle/chunks/chunk-3UJRFJ5R.js +1573 -0
  16. package/dist/cli-bundle/chunks/chunk-3VHSI5FL.js +1001 -0
  17. package/dist/cli-bundle/chunks/chunk-425E4QL5.js +278 -0
  18. package/dist/cli-bundle/chunks/chunk-425E4QL5.js.map +7 -0
  19. package/dist/cli-bundle/chunks/chunk-45FYNUFJ.js +38 -0
  20. package/dist/cli-bundle/chunks/chunk-45FYNUFJ.js.map +1 -0
  21. package/dist/cli-bundle/chunks/chunk-46CUF5L6.js +1018 -0
  22. package/dist/cli-bundle/chunks/chunk-4CJFCTLM.js +222 -0
  23. package/dist/cli-bundle/chunks/chunk-4CJFCTLM.js.map +1 -0
  24. package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js +249 -0
  25. package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js.map +7 -0
  26. package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js +819 -0
  27. package/dist/cli-bundle/chunks/chunk-4LELACOL.js +391 -0
  28. package/dist/cli-bundle/chunks/chunk-4LELACOL.js.map +1 -0
  29. package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js +279 -0
  30. package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js.map +1 -0
  31. package/dist/cli-bundle/chunks/chunk-4ZBE5GUN.js +184 -0
  32. package/dist/cli-bundle/chunks/chunk-4ZBE5GUN.js.map +7 -0
  33. package/dist/cli-bundle/chunks/chunk-57NWPFF2.js +5640 -0
  34. package/dist/cli-bundle/chunks/chunk-57NWPFF2.js.map +1 -0
  35. package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js +268 -0
  36. package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js.map +1 -0
  37. package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js +508 -0
  38. package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js.map +1 -0
  39. package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js +1868 -0
  40. package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js +1749 -0
  41. package/dist/cli-bundle/chunks/chunk-64YKRTSV.js +1961 -0
  42. package/dist/cli-bundle/chunks/chunk-6LLVNJXT.js +429 -0
  43. package/dist/cli-bundle/chunks/chunk-6QBJLYBP.js +120 -0
  44. package/dist/cli-bundle/chunks/chunk-6QBJLYBP.js.map +1 -0
  45. package/dist/cli-bundle/chunks/chunk-7D7OOEYG.js +278 -0
  46. package/dist/cli-bundle/chunks/chunk-7D7OOEYG.js.map +7 -0
  47. package/dist/cli-bundle/chunks/chunk-7DT4WSH2.js +60 -0
  48. package/dist/cli-bundle/chunks/chunk-7WBAJSS6.js +102 -0
  49. package/dist/cli-bundle/chunks/chunk-AGHMOTGM.js +150 -0
  50. package/dist/cli-bundle/chunks/chunk-ALFPSEWO.js +112 -0
  51. package/dist/cli-bundle/chunks/chunk-AZYGZGGI.js +361 -0
  52. package/dist/cli-bundle/chunks/chunk-B6DUFX6H.js +1413 -0
  53. package/dist/cli-bundle/chunks/chunk-B6XS3R3O.js +275 -0
  54. package/dist/cli-bundle/chunks/chunk-B6XS3R3O.js.map +1 -0
  55. package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js +421 -0
  56. package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js.map +1 -0
  57. package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js +1985 -0
  58. package/dist/cli-bundle/chunks/chunk-CFB33L7W.js +398 -0
  59. package/dist/cli-bundle/chunks/chunk-CFNGIXZP.js +784 -0
  60. package/dist/cli-bundle/chunks/chunk-CFNGIXZP.js.map +1 -0
  61. package/dist/cli-bundle/chunks/chunk-CL36D4PC.js +225 -0
  62. package/dist/cli-bundle/chunks/chunk-COSPOP7H.js +6677 -0
  63. package/dist/cli-bundle/chunks/chunk-COSPOP7H.js.map +7 -0
  64. package/dist/cli-bundle/chunks/chunk-COWTDV6B.js +3461 -0
  65. package/dist/cli-bundle/chunks/chunk-COWTDV6B.js.map +7 -0
  66. package/dist/cli-bundle/chunks/chunk-CRVYGJUI.js +553 -0
  67. package/dist/cli-bundle/chunks/chunk-CRVYGJUI.js.map +1 -0
  68. package/dist/cli-bundle/chunks/chunk-D2XRLB55.js +645 -0
  69. package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js +1858 -0
  70. package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js +1063 -0
  71. package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js.map +1 -0
  72. package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js +1932 -0
  73. package/dist/cli-bundle/chunks/chunk-E42XTBSP.js +1359 -0
  74. package/dist/cli-bundle/chunks/chunk-E42XTBSP.js.map +7 -0
  75. package/dist/cli-bundle/chunks/chunk-EBRZZ54H.js +655 -0
  76. package/dist/cli-bundle/chunks/chunk-EBRZZ54H.js.map +1 -0
  77. package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js +4712 -0
  78. package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js.map +1 -0
  79. package/dist/cli-bundle/chunks/chunk-EGY6JBQ3.js +160 -0
  80. package/dist/cli-bundle/chunks/chunk-EKFNL33R.js +222 -0
  81. package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js +1704 -0
  82. package/dist/cli-bundle/chunks/chunk-EOKXK3R3.js +2046 -0
  83. package/dist/cli-bundle/chunks/chunk-F3K4JGFD.js +121 -0
  84. package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js +231 -0
  85. package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js +2090 -0
  86. package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js.map +1 -0
  87. package/dist/cli-bundle/chunks/chunk-FT3QTERD.js +550 -0
  88. package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js +1570 -0
  89. package/dist/cli-bundle/chunks/chunk-G64OCSKU.js +444 -0
  90. package/dist/cli-bundle/chunks/chunk-GANUTS7W.js +1775 -0
  91. package/dist/cli-bundle/chunks/chunk-GBAX2ZAQ.js +401 -0
  92. package/dist/cli-bundle/chunks/chunk-GDDAGPWJ.js +105 -0
  93. package/dist/cli-bundle/chunks/chunk-GDDAGPWJ.js.map +1 -0
  94. package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js +239 -0
  95. package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js.map +1 -0
  96. package/dist/cli-bundle/chunks/chunk-GJ7QC5DJ.js +624 -0
  97. package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js +530 -0
  98. package/dist/cli-bundle/chunks/chunk-GZRDYONU.js +1005 -0
  99. package/dist/cli-bundle/chunks/chunk-HFDADVJZ.js +1356 -0
  100. package/dist/cli-bundle/chunks/chunk-HFDADVJZ.js.map +1 -0
  101. package/dist/cli-bundle/chunks/chunk-HIHMT6WS.js +41 -0
  102. package/dist/cli-bundle/chunks/chunk-HIHMT6WS.js.map +7 -0
  103. package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js +277 -0
  104. package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js.map +7 -0
  105. package/dist/cli-bundle/chunks/chunk-HOVCGJSD.js +293 -0
  106. package/dist/cli-bundle/chunks/chunk-HOVCGJSD.js.map +1 -0
  107. package/dist/cli-bundle/chunks/chunk-I36Y7PCE.js +38 -0
  108. package/dist/cli-bundle/chunks/chunk-I36Y7PCE.js.map +1 -0
  109. package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js +309 -0
  110. package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js.map +7 -0
  111. package/dist/cli-bundle/chunks/chunk-IWVU4C2F.js +358 -0
  112. package/dist/cli-bundle/chunks/chunk-IX5BXEMX.js +267 -0
  113. package/dist/cli-bundle/chunks/chunk-JDDLOQAE.js +265 -0
  114. package/dist/cli-bundle/chunks/chunk-JJP45OEI.js +119 -0
  115. package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js +2257 -0
  116. package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js.map +7 -0
  117. package/dist/cli-bundle/chunks/chunk-JVH7QBVV.js +24 -0
  118. package/dist/cli-bundle/chunks/chunk-JVH7QBVV.js.map +1 -0
  119. package/dist/cli-bundle/chunks/chunk-K46RF36U.js +207 -0
  120. package/dist/cli-bundle/chunks/chunk-KERMZVY5.js +371 -0
  121. package/dist/cli-bundle/chunks/chunk-KERMZVY5.js.map +7 -0
  122. package/dist/cli-bundle/chunks/chunk-KGFUY7WN.js +814 -0
  123. package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js +76 -0
  124. package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js.map +1 -0
  125. package/dist/cli-bundle/chunks/chunk-KUOOJR35.js +260 -0
  126. package/dist/cli-bundle/chunks/chunk-L5PSPMZ4.js +277 -0
  127. package/dist/cli-bundle/chunks/chunk-LK6XLOGP.js +5799 -0
  128. package/dist/cli-bundle/chunks/chunk-LK6XLOGP.js.map +7 -0
  129. package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js +140 -0
  130. package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js.map +1 -0
  131. package/dist/cli-bundle/chunks/chunk-LPSSSDJR.js +1239 -0
  132. package/dist/cli-bundle/chunks/chunk-M7JNBQAD.js +225 -0
  133. package/dist/cli-bundle/chunks/chunk-M7JNBQAD.js.map +7 -0
  134. package/dist/cli-bundle/chunks/chunk-MA4SM3QZ.js +655 -0
  135. package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js +1601 -0
  136. package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js.map +1 -0
  137. package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js +1031 -0
  138. package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js +995 -0
  139. package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js +296 -0
  140. package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js.map +1 -0
  141. package/dist/cli-bundle/chunks/chunk-MLIYFOE7.js +357 -0
  142. package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js +2043 -0
  143. package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js.map +7 -0
  144. package/dist/cli-bundle/chunks/chunk-MUH7A3FD.js +61 -0
  145. package/dist/cli-bundle/chunks/chunk-MVSP7WGJ.js +108 -0
  146. package/dist/cli-bundle/chunks/chunk-MVSP7WGJ.js.map +7 -0
  147. package/dist/cli-bundle/chunks/chunk-MVYWGY2A.js +262 -0
  148. package/dist/cli-bundle/chunks/chunk-MWMVPCIE.js +1423 -0
  149. package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js +2033 -0
  150. package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js.map +1 -0
  151. package/dist/cli-bundle/chunks/chunk-N745W3B3.js +1604 -0
  152. package/dist/cli-bundle/chunks/chunk-N745W3B3.js.map +7 -0
  153. package/dist/cli-bundle/chunks/chunk-NB7RLQFW.js +57 -0
  154. package/dist/cli-bundle/chunks/chunk-NB7RLQFW.js.map +7 -0
  155. package/dist/cli-bundle/chunks/chunk-NC33K5ZS.js +123 -0
  156. package/dist/cli-bundle/chunks/chunk-NC33K5ZS.js.map +7 -0
  157. package/dist/cli-bundle/chunks/chunk-NGXQ3PFT.js +263 -0
  158. package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js +1615 -0
  159. package/dist/cli-bundle/chunks/chunk-NO442GWJ.js +41 -0
  160. package/dist/cli-bundle/chunks/chunk-NO442GWJ.js.map +7 -0
  161. package/dist/cli-bundle/chunks/chunk-NZEHECMW.js +658 -0
  162. package/dist/cli-bundle/chunks/chunk-NZEHECMW.js.map +7 -0
  163. package/dist/cli-bundle/chunks/chunk-O6AWCQRQ.js +124 -0
  164. package/dist/cli-bundle/chunks/chunk-OGWQ2IEP.js +240 -0
  165. package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js +143 -0
  166. package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js.map +7 -0
  167. package/dist/cli-bundle/chunks/chunk-QLMX7SRD.js +210 -0
  168. package/dist/cli-bundle/chunks/chunk-QX6HM775.js +398 -0
  169. package/dist/cli-bundle/chunks/chunk-QX6HM775.js.map +7 -0
  170. package/dist/cli-bundle/chunks/chunk-R5BMJX33.js +27 -0
  171. package/dist/cli-bundle/chunks/chunk-R5BMJX33.js.map +7 -0
  172. package/dist/cli-bundle/chunks/chunk-RCQZK2GO.js +296 -0
  173. package/dist/cli-bundle/chunks/chunk-RCQZK2GO.js.map +7 -0
  174. package/dist/cli-bundle/chunks/chunk-RFNYTESG.js +520 -0
  175. package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js +79 -0
  176. package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js.map +7 -0
  177. package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js +282 -0
  178. package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js.map +7 -0
  179. package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js +274 -0
  180. package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js.map +1 -0
  181. package/dist/cli-bundle/chunks/chunk-SCUR7K7N.js +2198 -0
  182. package/dist/cli-bundle/chunks/chunk-SGMFPXKR.js +68 -0
  183. package/dist/cli-bundle/chunks/chunk-SGMFPXKR.js.map +1 -0
  184. package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js +1977 -0
  185. package/dist/cli-bundle/chunks/chunk-SMB7RV23.js +130 -0
  186. package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js +1041 -0
  187. package/dist/cli-bundle/chunks/chunk-SQOIV3OQ.js +563 -0
  188. package/dist/cli-bundle/chunks/chunk-SQOIV3OQ.js.map +7 -0
  189. package/dist/cli-bundle/chunks/chunk-SQYJ4HF2.js +1765 -0
  190. package/dist/cli-bundle/chunks/chunk-T42JWV3F.js +822 -0
  191. package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js +6567 -0
  192. package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js.map +1 -0
  193. package/dist/cli-bundle/chunks/chunk-TULGS6X6.js +2132 -0
  194. package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js +2306 -0
  195. package/dist/cli-bundle/chunks/chunk-UH7T2DAX.js +181 -0
  196. package/dist/cli-bundle/chunks/chunk-UH7T2DAX.js.map +1 -0
  197. package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js +4773 -0
  198. package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js.map +7 -0
  199. package/dist/cli-bundle/chunks/chunk-VPIM42PC.js +367 -0
  200. package/dist/cli-bundle/chunks/chunk-VQRSPVME.js +368 -0
  201. package/dist/cli-bundle/chunks/chunk-VQRSPVME.js.map +1 -0
  202. package/dist/cli-bundle/chunks/chunk-W3DSJQIO.js +447 -0
  203. package/dist/cli-bundle/chunks/chunk-W572BIEB.js +1249 -0
  204. package/dist/cli-bundle/chunks/chunk-W6DYWXPQ.js +1073 -0
  205. package/dist/cli-bundle/chunks/chunk-W6DYWXPQ.js.map +7 -0
  206. package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js +3423 -0
  207. package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js.map +1 -0
  208. package/dist/cli-bundle/chunks/chunk-WLSM645P.js +2247 -0
  209. package/dist/cli-bundle/chunks/chunk-WLSM645P.js.map +1 -0
  210. package/dist/cli-bundle/chunks/chunk-WRTENIX3.js +215 -0
  211. package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js +388 -0
  212. package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js.map +1 -0
  213. package/dist/cli-bundle/chunks/chunk-XB7KFVFI.js +533 -0
  214. package/dist/cli-bundle/chunks/chunk-XC5BURG2.js +306 -0
  215. package/dist/cli-bundle/chunks/chunk-XC5BURG2.js.map +1 -0
  216. package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js +424 -0
  217. package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js.map +7 -0
  218. package/dist/cli-bundle/chunks/chunk-XG625QP4.js +58 -0
  219. package/dist/cli-bundle/chunks/chunk-XHET7YUZ.js +71 -0
  220. package/dist/cli-bundle/chunks/chunk-XHET7YUZ.js.map +7 -0
  221. package/dist/cli-bundle/chunks/chunk-XUC7PI2H.js +243 -0
  222. package/dist/cli-bundle/chunks/chunk-Y46GD4IX.js +116 -0
  223. package/dist/cli-bundle/chunks/chunk-Y4M7CPQP.js +804 -0
  224. package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js +2128 -0
  225. package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js.map +7 -0
  226. package/dist/cli-bundle/chunks/chunk-YN7Y6DQZ.js +426 -0
  227. package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js +511 -0
  228. package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js.map +7 -0
  229. package/dist/cli-bundle/chunks/chunk-ZGK4L4JM.js +133 -0
  230. package/dist/cli-bundle/chunks/chunk-ZJ262CED.js +394 -0
  231. package/dist/cli-bundle/chunks/chunk-ZJ262CED.js.map +7 -0
  232. package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js +299 -0
  233. package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js.map +7 -0
  234. package/dist/cli-bundle/chunks/chunk-ZSUS2OD3.js +2105 -0
  235. package/dist/cli-bundle/chunks/chunk-ZWBEPGD7.js +54 -0
  236. package/dist/cli-bundle/chunks/chunk-ZWBEPGD7.js.map +1 -0
  237. package/dist/cli-bundle/chunks/chunk-ZZD4J5XY.js +1570 -0
  238. package/dist/cli-bundle/chunks/claim-RFS7BROJ.js +19 -0
  239. package/dist/cli-bundle/chunks/claim-XP5AWZ5H.js +23 -0
  240. package/dist/cli-bundle/chunks/close-2SSSHHUZ.js +20 -0
  241. package/dist/cli-bundle/chunks/close-GEANHQ2J.js +16 -0
  242. package/dist/cli-bundle/chunks/close-many-CMZW7ITN.js +31 -0
  243. package/dist/cli-bundle/chunks/close-many-ZFDIG6M7.js +27 -0
  244. package/dist/cli-bundle/chunks/comments-MFSYVNNU.js +21 -0
  245. package/dist/cli-bundle/chunks/comments-XUBPXDYX.js +17 -0
  246. package/dist/cli-bundle/chunks/config-D7XQMONX.js +18 -0
  247. package/dist/cli-bundle/chunks/config-T4FHBSYN.js +22 -0
  248. package/dist/cli-bundle/chunks/context-DIU275XI.js +48 -0
  249. package/dist/cli-bundle/chunks/context-JCOYB4LZ.js +44 -0
  250. package/dist/cli-bundle/chunks/contracts-BVO7CSLK.js +12 -0
  251. package/dist/cli-bundle/chunks/contracts-NYPEW2G4.js +16 -0
  252. package/dist/cli-bundle/chunks/copy-32ROBIDL.js +17 -0
  253. package/dist/cli-bundle/chunks/copy-NAGLGMHZ.js +13 -0
  254. package/dist/cli-bundle/chunks/create-4V7SWNBB.js +30 -0
  255. package/dist/cli-bundle/chunks/create-E77SDCUP.js +34 -0
  256. package/dist/cli-bundle/chunks/delete-NQI5OSKN.js +14 -0
  257. package/dist/cli-bundle/chunks/delete-RA5KTCLB.js +18 -0
  258. package/dist/cli-bundle/chunks/deps-32SU7HO5.js +21 -0
  259. package/dist/cli-bundle/chunks/deps-T7SCWXEX.js +17 -0
  260. package/dist/cli-bundle/chunks/docs-RRUPT7O2.js +22 -0
  261. package/dist/cli-bundle/chunks/docs-WL2IWGWV.js +18 -0
  262. package/dist/cli-bundle/chunks/eval-NF2J5SHR.js +23 -0
  263. package/dist/cli-bundle/chunks/eval-SKDT3MZU.js +27 -0
  264. package/dist/cli-bundle/chunks/extension-LAXKCAYE.js +42 -0
  265. package/dist/cli-bundle/chunks/extension-LAXKCAYE.js.map +1 -0
  266. package/dist/cli-bundle/chunks/extension-ZISPBRBC.js +38 -0
  267. package/dist/cli-bundle/chunks/extension-ZISPBRBC.js.map +7 -0
  268. package/dist/cli-bundle/chunks/files-EWRQHGIS.js +22 -0
  269. package/dist/cli-bundle/chunks/files-EWRQHGIS.js.map +7 -0
  270. package/dist/cli-bundle/chunks/files-PYKR2UUG.js +26 -0
  271. package/dist/cli-bundle/chunks/files-PYKR2UUG.js.map +1 -0
  272. package/dist/cli-bundle/chunks/focus-4T7TM4MT.js +18 -0
  273. package/dist/cli-bundle/chunks/focus-4T7TM4MT.js.map +1 -0
  274. package/dist/cli-bundle/chunks/focus-L3YUASOD.js +14 -0
  275. package/dist/cli-bundle/chunks/focus-L3YUASOD.js.map +7 -0
  276. package/dist/cli-bundle/chunks/gc-2DNMPXMC.js +16 -0
  277. package/dist/cli-bundle/chunks/gc-2DNMPXMC.js.map +1 -0
  278. package/dist/cli-bundle/chunks/gc-2PCTYYRI.js +12 -0
  279. package/dist/cli-bundle/chunks/gc-2PCTYYRI.js.map +7 -0
  280. package/dist/cli-bundle/chunks/get-7DMITJ3G.js +23 -0
  281. package/dist/cli-bundle/chunks/get-7DMITJ3G.js.map +1 -0
  282. package/dist/cli-bundle/chunks/get-VKQXCXLL.js +19 -0
  283. package/dist/cli-bundle/chunks/get-VKQXCXLL.js.map +7 -0
  284. package/dist/cli-bundle/chunks/health-CVSTAR2F.js +31 -0
  285. package/dist/cli-bundle/chunks/health-CVSTAR2F.js.map +7 -0
  286. package/dist/cli-bundle/chunks/health-TV3GKTFN.js +35 -0
  287. package/dist/cli-bundle/chunks/health-TV3GKTFN.js.map +1 -0
  288. package/dist/cli-bundle/chunks/history-D4JUX5XV.js +20 -0
  289. package/dist/cli-bundle/chunks/history-D4JUX5XV.js.map +7 -0
  290. package/dist/cli-bundle/chunks/history-LQ2UWZTE.js +24 -0
  291. package/dist/cli-bundle/chunks/history-LQ2UWZTE.js.map +1 -0
  292. package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js +29 -0
  293. package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js.map +1 -0
  294. package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js +25 -0
  295. package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js.map +7 -0
  296. package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js +21 -0
  297. package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js.map +7 -0
  298. package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js +25 -0
  299. package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js.map +1 -0
  300. package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js +23 -0
  301. package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js.map +7 -0
  302. package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js +27 -0
  303. package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js.map +1 -0
  304. package/dist/cli-bundle/chunks/init-C3LJPWQZ.js +30 -0
  305. package/dist/cli-bundle/chunks/init-C3LJPWQZ.js.map +1 -0
  306. package/dist/cli-bundle/chunks/init-J3DPGWQI.js +26 -0
  307. package/dist/cli-bundle/chunks/init-J3DPGWQI.js.map +7 -0
  308. package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js +21 -0
  309. package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js.map +1 -0
  310. package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js +17 -0
  311. package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js.map +7 -0
  312. package/dist/cli-bundle/chunks/list-O5NZVSPN.js +36 -0
  313. package/dist/cli-bundle/chunks/list-O5NZVSPN.js.map +1 -0
  314. package/dist/cli-bundle/chunks/list-Z55YCNTC.js +32 -0
  315. package/dist/cli-bundle/chunks/list-Z55YCNTC.js.map +7 -0
  316. package/dist/cli-bundle/chunks/next-GBNTGXFC.js +28 -0
  317. package/dist/cli-bundle/chunks/next-GBNTGXFC.js.map +7 -0
  318. package/dist/cli-bundle/chunks/next-QKW7PTKE.js +32 -0
  319. package/dist/cli-bundle/chunks/next-QKW7PTKE.js.map +1 -0
  320. package/dist/cli-bundle/chunks/notes-R5FZTKWF.js +17 -0
  321. package/dist/cli-bundle/chunks/notes-R5FZTKWF.js.map +7 -0
  322. package/dist/cli-bundle/chunks/notes-WCGIULVG.js +21 -0
  323. package/dist/cli-bundle/chunks/notes-WCGIULVG.js.map +1 -0
  324. package/dist/cli-bundle/chunks/plan-ADISFYH4.js +29 -0
  325. package/dist/cli-bundle/chunks/plan-ADISFYH4.js.map +7 -0
  326. package/dist/cli-bundle/chunks/plan-CHVE7PBR.js +33 -0
  327. package/dist/cli-bundle/chunks/plan-CHVE7PBR.js.map +1 -0
  328. package/dist/cli-bundle/chunks/profile-LD23PSI6.js +37 -0
  329. package/dist/cli-bundle/chunks/profile-LD23PSI6.js.map +7 -0
  330. package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js +41 -0
  331. package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js.map +1 -0
  332. package/dist/cli-bundle/chunks/register-list-query-B42JCCOI.js +409 -0
  333. package/dist/cli-bundle/chunks/register-list-query-OEYQHFXO.js +419 -0
  334. package/dist/cli-bundle/chunks/register-mutation-3QXIHCQG.js +1273 -0
  335. package/dist/cli-bundle/chunks/register-mutation-IAEST26S.js +1256 -0
  336. package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js +19 -0
  337. package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js.map +7 -0
  338. package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js +23 -0
  339. package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js.map +1 -0
  340. package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js +324 -0
  341. package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js.map +7 -0
  342. package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js +321 -0
  343. package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js.map +1 -0
  344. package/dist/cli-bundle/chunks/restore-5RQHAPMA.js +23 -0
  345. package/dist/cli-bundle/chunks/restore-5RQHAPMA.js.map +1 -0
  346. package/dist/cli-bundle/chunks/restore-PNEIBBLW.js +19 -0
  347. package/dist/cli-bundle/chunks/restore-PNEIBBLW.js.map +7 -0
  348. package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js +29 -0
  349. package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js.map +1 -0
  350. package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js +25 -0
  351. package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js.map +7 -0
  352. package/dist/cli-bundle/chunks/schema-245WW4G2.js +78 -0
  353. package/dist/cli-bundle/chunks/schema-245WW4G2.js.map +1 -0
  354. package/dist/cli-bundle/chunks/schema-HBORFC6B.js +74 -0
  355. package/dist/cli-bundle/chunks/schema-HBORFC6B.js.map +7 -0
  356. package/dist/cli-bundle/chunks/search-AOZC5SIK.js +34 -0
  357. package/dist/cli-bundle/chunks/search-AOZC5SIK.js.map +7 -0
  358. package/dist/cli-bundle/chunks/search-DRXPGHD7.js +38 -0
  359. package/dist/cli-bundle/chunks/search-DRXPGHD7.js.map +1 -0
  360. package/dist/cli-bundle/chunks/stats-NJG4NLHG.js +21 -0
  361. package/dist/cli-bundle/chunks/stats-NJG4NLHG.js.map +1 -0
  362. package/dist/cli-bundle/chunks/stats-RG6AG4N2.js +17 -0
  363. package/dist/cli-bundle/chunks/stats-RG6AG4N2.js.map +7 -0
  364. package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js +14 -0
  365. package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js.map +7 -0
  366. package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js +18 -0
  367. package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js.map +1 -0
  368. package/dist/cli-bundle/chunks/test-6CMOCWUC.js +39 -0
  369. package/dist/cli-bundle/chunks/test-6CMOCWUC.js.map +7 -0
  370. package/dist/cli-bundle/chunks/test-RI7XHBZL.js +43 -0
  371. package/dist/cli-bundle/chunks/test-RI7XHBZL.js.map +1 -0
  372. package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js +29 -0
  373. package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js.map +7 -0
  374. package/dist/cli-bundle/chunks/test-all-QEIORFYW.js +33 -0
  375. package/dist/cli-bundle/chunks/test-all-QEIORFYW.js.map +1 -0
  376. package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js +28 -0
  377. package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js.map +1 -0
  378. package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js +24 -0
  379. package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js.map +7 -0
  380. package/dist/cli-bundle/chunks/update-QVJDFEAP.js +30 -0
  381. package/dist/cli-bundle/chunks/update-QVJDFEAP.js.map +1 -0
  382. package/dist/cli-bundle/chunks/update-VQVHAY6X.js +26 -0
  383. package/dist/cli-bundle/chunks/update-VQVHAY6X.js.map +7 -0
  384. package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js +37 -0
  385. package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js.map +7 -0
  386. package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js +41 -0
  387. package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js.map +1 -0
  388. package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js +24 -0
  389. package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js.map +7 -0
  390. package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js +28 -0
  391. package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js.map +1 -0
  392. package/dist/cli-bundle/chunks/validate-4NTXSB62.js +36 -0
  393. package/dist/cli-bundle/chunks/validate-4NTXSB62.js.map +1 -0
  394. package/dist/cli-bundle/chunks/validate-MUFXQZMI.js +32 -0
  395. package/dist/cli-bundle/chunks/validate-MUFXQZMI.js.map +7 -0
  396. package/dist/cli-bundle/main.js +16 -16
  397. package/dist/cli-bundle/sdk-runtime.js +88 -28
  398. package/dist/cli-bundle/sdk-testing.js +6 -6
  399. package/dist/cli-bundle/sdk.js +92 -49
  400. package/dist/cli-bundle/sdk.js.map +2 -2
  401. package/dist/mcp/server.d.ts +22 -50
  402. package/dist/mcp/server.js +62 -916
  403. package/dist/mcp/server.js.map +1 -1
  404. package/dist/sdk/index.d.ts +4 -2
  405. package/dist/sdk/index.js +4 -4
  406. package/dist/sdk/index.js.map +1 -1
  407. package/dist/sdk/runtime.d.ts +168 -4
  408. package/dist/sdk/runtime.js +1149 -25
  409. package/dist/sdk/runtime.js.map +1 -1
  410. package/dist/sdk/workspace-contracts-cache.d.ts +17 -0
  411. package/dist/sdk/workspace-contracts-cache.js +36 -0
  412. package/dist/sdk/workspace-contracts-cache.js.map +1 -0
  413. package/docs/RELEASING.md +3 -1
  414. package/docs/SDK.md +46 -0
  415. package/docs/examples/sdk-app-embedding/run-embedded-pm.mjs +16 -2
  416. package/docs/examples/sdk-contract-consumer/inspect-contracts.mjs +16 -1
  417. package/package.json +1 -1
  418. package/dist/cli-bundle/chunks/activity-4XQIDNM5.js +0 -18
  419. package/dist/cli-bundle/chunks/activity-YKAKZTZ4.js +0 -22
  420. package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js +0 -375
  421. package/dist/cli-bundle/chunks/aggregate-EQX2RGB7.js.map +0 -7
  422. package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js +0 -372
  423. package/dist/cli-bundle/chunks/aggregate-PEGZGJXD.js.map +0 -1
  424. package/dist/cli-bundle/chunks/append-CZGUZ45Q.js +0 -73
  425. package/dist/cli-bundle/chunks/append-CZGUZ45Q.js.map +0 -7
  426. package/dist/cli-bundle/chunks/append-NSQBCXZJ.js +0 -70
  427. package/dist/cli-bundle/chunks/append-NSQBCXZJ.js.map +0 -1
  428. package/dist/cli-bundle/chunks/chunk-3JZNEQBA.js +0 -1413
  429. package/dist/cli-bundle/chunks/chunk-3PL6LEKP.js +0 -1961
  430. package/dist/cli-bundle/chunks/chunk-3U3VEWK6.js +0 -1749
  431. package/dist/cli-bundle/chunks/chunk-3Y4OESPP.js +0 -277
  432. package/dist/cli-bundle/chunks/chunk-4LRVSBO6.js +0 -822
  433. package/dist/cli-bundle/chunks/chunk-4OFLJHX6.js +0 -356
  434. package/dist/cli-bundle/chunks/chunk-4QQ6PM7M.js +0 -1249
  435. package/dist/cli-bundle/chunks/chunk-53BTLLAF.js +0 -2181
  436. package/dist/cli-bundle/chunks/chunk-53BTLLAF.js.map +0 -1
  437. package/dist/cli-bundle/chunks/chunk-57C2RLW5.js +0 -1704
  438. package/dist/cli-bundle/chunks/chunk-5B3X4Y22.js +0 -2330
  439. package/dist/cli-bundle/chunks/chunk-5J2XPTAD.js +0 -225
  440. package/dist/cli-bundle/chunks/chunk-5JE6SMYS.js +0 -262
  441. package/dist/cli-bundle/chunks/chunk-5JZ7APJU.js +0 -995
  442. package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js +0 -5789
  443. package/dist/cli-bundle/chunks/chunk-5VVUKE3U.js.map +0 -7
  444. package/dist/cli-bundle/chunks/chunk-75U6M5ZD.js +0 -819
  445. package/dist/cli-bundle/chunks/chunk-7EQNAZX2.js +0 -1018
  446. package/dist/cli-bundle/chunks/chunk-7MDXZAZS.js +0 -102
  447. package/dist/cli-bundle/chunks/chunk-7QH7DHUB.js +0 -2046
  448. package/dist/cli-bundle/chunks/chunk-7WYXBPYQ.js +0 -358
  449. package/dist/cli-bundle/chunks/chunk-AAEQMOC6.js +0 -150
  450. package/dist/cli-bundle/chunks/chunk-ABRA3BHY.js +0 -429
  451. package/dist/cli-bundle/chunks/chunk-BFVHCAOO.js +0 -240
  452. package/dist/cli-bundle/chunks/chunk-BVEUCSH2.js +0 -530
  453. package/dist/cli-bundle/chunks/chunk-C3PMDWGX.js +0 -160
  454. package/dist/cli-bundle/chunks/chunk-D3UCE7RW.js +0 -243
  455. package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js +0 -275
  456. package/dist/cli-bundle/chunks/chunk-DC3QJQWI.js.map +0 -7
  457. package/dist/cli-bundle/chunks/chunk-DLQ4ZTCU.js +0 -634
  458. package/dist/cli-bundle/chunks/chunk-DRBV5UC2.js +0 -231
  459. package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js +0 -2184
  460. package/dist/cli-bundle/chunks/chunk-E2FUG6GD.js.map +0 -7
  461. package/dist/cli-bundle/chunks/chunk-EEY54JMF.js +0 -60
  462. package/dist/cli-bundle/chunks/chunk-EZFKWSC7.js +0 -1615
  463. package/dist/cli-bundle/chunks/chunk-FDBARR33.js +0 -655
  464. package/dist/cli-bundle/chunks/chunk-FGQKEDE4.js +0 -447
  465. package/dist/cli-bundle/chunks/chunk-FJRKQREY.js +0 -228
  466. package/dist/cli-bundle/chunks/chunk-FUM6UMY4.js +0 -804
  467. package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js +0 -3237
  468. package/dist/cli-bundle/chunks/chunk-GIWXVMZ3.js.map +0 -7
  469. package/dist/cli-bundle/chunks/chunk-HBYZDSK5.js +0 -426
  470. package/dist/cli-bundle/chunks/chunk-HJE4JTKQ.js +0 -124
  471. package/dist/cli-bundle/chunks/chunk-HK72NWAD.js +0 -1570
  472. package/dist/cli-bundle/chunks/chunk-IJ6CO3JV.js +0 -645
  473. package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js +0 -3206
  474. package/dist/cli-bundle/chunks/chunk-JFCVQXZX.js.map +0 -1
  475. package/dist/cli-bundle/chunks/chunk-JLA7EVYV.js +0 -222
  476. package/dist/cli-bundle/chunks/chunk-K32L7HZO.js +0 -76
  477. package/dist/cli-bundle/chunks/chunk-K32L7HZO.js.map +0 -1
  478. package/dist/cli-bundle/chunks/chunk-K3AGVXSF.js +0 -444
  479. package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js +0 -79
  480. package/dist/cli-bundle/chunks/chunk-KDZ6K25I.js.map +0 -7
  481. package/dist/cli-bundle/chunks/chunk-KL22PY6L.js +0 -915
  482. package/dist/cli-bundle/chunks/chunk-KL22PY6L.js.map +0 -1
  483. package/dist/cli-bundle/chunks/chunk-KLG4ZULO.js +0 -218
  484. package/dist/cli-bundle/chunks/chunk-LEKT4K7I.js +0 -2105
  485. package/dist/cli-bundle/chunks/chunk-MNZ7DRNC.js +0 -1858
  486. package/dist/cli-bundle/chunks/chunk-MTTXDAK4.js +0 -2198
  487. package/dist/cli-bundle/chunks/chunk-MZ7VNEVY.js +0 -520
  488. package/dist/cli-bundle/chunks/chunk-N6DNM2FA.js +0 -116
  489. package/dist/cli-bundle/chunks/chunk-N7X4WP6L.js +0 -1041
  490. package/dist/cli-bundle/chunks/chunk-NBFCNJ7Q.js +0 -2132
  491. package/dist/cli-bundle/chunks/chunk-NER3KUUS.js +0 -260
  492. package/dist/cli-bundle/chunks/chunk-OBA2WH65.js +0 -918
  493. package/dist/cli-bundle/chunks/chunk-OBA2WH65.js.map +0 -7
  494. package/dist/cli-bundle/chunks/chunk-OESSOFJ4.js +0 -1985
  495. package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js +0 -238
  496. package/dist/cli-bundle/chunks/chunk-OK5NXCZB.js.map +0 -1
  497. package/dist/cli-bundle/chunks/chunk-OWTIRHX4.js +0 -112
  498. package/dist/cli-bundle/chunks/chunk-P3VRG72Q.js +0 -1765
  499. package/dist/cli-bundle/chunks/chunk-P5TFTLWW.js +0 -1423
  500. package/dist/cli-bundle/chunks/chunk-P5YORJRH.js +0 -1977
  501. package/dist/cli-bundle/chunks/chunk-PDXT6Q55.js +0 -58
  502. package/dist/cli-bundle/chunks/chunk-PJ3A56YF.js +0 -1239
  503. package/dist/cli-bundle/chunks/chunk-PPAJG4GB.js +0 -1031
  504. package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js +0 -4725
  505. package/dist/cli-bundle/chunks/chunk-PPE4YUQM.js.map +0 -1
  506. package/dist/cli-bundle/chunks/chunk-QHZO65XW.js +0 -1775
  507. package/dist/cli-bundle/chunks/chunk-R3ZBLGTC.js +0 -814
  508. package/dist/cli-bundle/chunks/chunk-RCT3YJOK.js +0 -624
  509. package/dist/cli-bundle/chunks/chunk-RX3HQSYG.js +0 -265
  510. package/dist/cli-bundle/chunks/chunk-S4APD35C.js +0 -210
  511. package/dist/cli-bundle/chunks/chunk-S5AYOUT5.js +0 -130
  512. package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js +0 -1149
  513. package/dist/cli-bundle/chunks/chunk-STPSZ2XY.js.map +0 -1
  514. package/dist/cli-bundle/chunks/chunk-T35XLYZF.js +0 -263
  515. package/dist/cli-bundle/chunks/chunk-T3ABIMGW.js +0 -361
  516. package/dist/cli-bundle/chunks/chunk-T3F4DF23.js +0 -267
  517. package/dist/cli-bundle/chunks/chunk-T4MX77AK.js +0 -272
  518. package/dist/cli-bundle/chunks/chunk-T4MX77AK.js.map +0 -1
  519. package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js +0 -5354
  520. package/dist/cli-bundle/chunks/chunk-T5Y3QSNF.js.map +0 -1
  521. package/dist/cli-bundle/chunks/chunk-TSPKZRRW.js +0 -1570
  522. package/dist/cli-bundle/chunks/chunk-TT42JUMF.js +0 -207
  523. package/dist/cli-bundle/chunks/chunk-UHKX7I75.js +0 -165
  524. package/dist/cli-bundle/chunks/chunk-UHKX7I75.js.map +0 -1
  525. package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js +0 -4786
  526. package/dist/cli-bundle/chunks/chunk-UI5BJ6DO.js.map +0 -7
  527. package/dist/cli-bundle/chunks/chunk-US3T3W5J.js +0 -1932
  528. package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js +0 -175
  529. package/dist/cli-bundle/chunks/chunk-UZRDBL6W.js.map +0 -7
  530. package/dist/cli-bundle/chunks/chunk-VZIYHZDX.js +0 -1868
  531. package/dist/cli-bundle/chunks/chunk-WISPVC2E.js +0 -401
  532. package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js +0 -5434
  533. package/dist/cli-bundle/chunks/chunk-WVSGSZ6J.js.map +0 -7
  534. package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js +0 -1152
  535. package/dist/cli-bundle/chunks/chunk-XQCG2JGW.js.map +0 -7
  536. package/dist/cli-bundle/chunks/chunk-Y76TWC45.js +0 -550
  537. package/dist/cli-bundle/chunks/chunk-YD5FML7K.js +0 -5630
  538. package/dist/cli-bundle/chunks/chunk-YD5FML7K.js.map +0 -1
  539. package/dist/cli-bundle/chunks/chunk-YFIE7YK6.js +0 -57
  540. package/dist/cli-bundle/chunks/chunk-YMABYTNG.js +0 -1573
  541. package/dist/cli-bundle/chunks/chunk-YOF5VPKM.js +0 -119
  542. package/dist/cli-bundle/chunks/chunk-YPPVU5GX.js +0 -398
  543. package/dist/cli-bundle/chunks/chunk-YQMMMONE.js +0 -133
  544. package/dist/cli-bundle/chunks/chunk-YSAH5FY5.js +0 -1001
  545. package/dist/cli-bundle/chunks/chunk-YZIR4R3U.js +0 -1005
  546. package/dist/cli-bundle/chunks/chunk-Z2CRRZYF.js +0 -215
  547. package/dist/cli-bundle/chunks/chunk-ZAHXPXVY.js +0 -533
  548. package/dist/cli-bundle/chunks/chunk-ZCJAA3JK.js +0 -121
  549. package/dist/cli-bundle/chunks/chunk-ZD34OFFQ.js +0 -366
  550. package/dist/cli-bundle/chunks/chunk-ZJB3UV5U.js +0 -2306
  551. package/dist/cli-bundle/chunks/chunk-ZMD35NYG.js +0 -61
  552. package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js +0 -241
  553. package/dist/cli-bundle/chunks/chunk-ZVDL32GJ.js.map +0 -7
  554. package/dist/cli-bundle/chunks/claim-4DROPSIS.js +0 -144
  555. package/dist/cli-bundle/chunks/claim-4DROPSIS.js.map +0 -1
  556. package/dist/cli-bundle/chunks/claim-VX54TV5U.js +0 -147
  557. package/dist/cli-bundle/chunks/claim-VX54TV5U.js.map +0 -7
  558. package/dist/cli-bundle/chunks/close-3YRR3XY6.js +0 -20
  559. package/dist/cli-bundle/chunks/close-OB2Y4QP5.js +0 -16
  560. package/dist/cli-bundle/chunks/close-many-AP4MWU36.js +0 -397
  561. package/dist/cli-bundle/chunks/close-many-AP4MWU36.js.map +0 -1
  562. package/dist/cli-bundle/chunks/close-many-OMZIGZB4.js +0 -400
  563. package/dist/cli-bundle/chunks/close-many-OMZIGZB4.js.map +0 -7
  564. package/dist/cli-bundle/chunks/comments-MIW5MZOX.js +0 -128
  565. package/dist/cli-bundle/chunks/comments-MIW5MZOX.js.map +0 -7
  566. package/dist/cli-bundle/chunks/comments-SAG5LSKL.js +0 -125
  567. package/dist/cli-bundle/chunks/comments-SAG5LSKL.js.map +0 -1
  568. package/dist/cli-bundle/chunks/config-DJJKZB5R.js +0 -1075
  569. package/dist/cli-bundle/chunks/config-DJJKZB5R.js.map +0 -7
  570. package/dist/cli-bundle/chunks/config-V57QD47V.js +0 -1065
  571. package/dist/cli-bundle/chunks/config-V57QD47V.js.map +0 -1
  572. package/dist/cli-bundle/chunks/context-4OQGIPSO.js +0 -45
  573. package/dist/cli-bundle/chunks/context-WLA6IAWE.js +0 -49
  574. package/dist/cli-bundle/chunks/contracts-HXJLKCRI.js +0 -12
  575. package/dist/cli-bundle/chunks/contracts-OJEXMKVW.js +0 -16
  576. package/dist/cli-bundle/chunks/copy-LEE6P6EM.js +0 -184
  577. package/dist/cli-bundle/chunks/copy-LEE6P6EM.js.map +0 -7
  578. package/dist/cli-bundle/chunks/copy-OTJOWFL6.js +0 -181
  579. package/dist/cli-bundle/chunks/copy-OTJOWFL6.js.map +0 -1
  580. package/dist/cli-bundle/chunks/create-WKOZKPQR.js +0 -30
  581. package/dist/cli-bundle/chunks/create-XWWQFQ6S.js +0 -34
  582. package/dist/cli-bundle/chunks/delete-62JQTYT4.js +0 -59
  583. package/dist/cli-bundle/chunks/delete-62JQTYT4.js.map +0 -7
  584. package/dist/cli-bundle/chunks/delete-HQKGRNRZ.js +0 -56
  585. package/dist/cli-bundle/chunks/delete-HQKGRNRZ.js.map +0 -1
  586. package/dist/cli-bundle/chunks/deps-55FTG6Z5.js +0 -224
  587. package/dist/cli-bundle/chunks/deps-55FTG6Z5.js.map +0 -1
  588. package/dist/cli-bundle/chunks/deps-L2FPIAD3.js +0 -227
  589. package/dist/cli-bundle/chunks/deps-L2FPIAD3.js.map +0 -7
  590. package/dist/cli-bundle/chunks/docs-6CRCSVKK.js +0 -33
  591. package/dist/cli-bundle/chunks/docs-6CRCSVKK.js.map +0 -1
  592. package/dist/cli-bundle/chunks/docs-S6UTOTO5.js +0 -36
  593. package/dist/cli-bundle/chunks/docs-S6UTOTO5.js.map +0 -7
  594. package/dist/cli-bundle/chunks/eval-N6UHFWVO.js +0 -288
  595. package/dist/cli-bundle/chunks/eval-N6UHFWVO.js.map +0 -7
  596. package/dist/cli-bundle/chunks/eval-PHOTWYHI.js +0 -278
  597. package/dist/cli-bundle/chunks/eval-PHOTWYHI.js.map +0 -1
  598. package/dist/cli-bundle/chunks/extension-NBAH62ML.js +0 -40
  599. package/dist/cli-bundle/chunks/extension-ZF6ZZPOU.js +0 -44
  600. package/dist/cli-bundle/chunks/files-6P57MRKL.js +0 -301
  601. package/dist/cli-bundle/chunks/files-6P57MRKL.js.map +0 -7
  602. package/dist/cli-bundle/chunks/files-JPU3FNJ7.js +0 -298
  603. package/dist/cli-bundle/chunks/files-JPU3FNJ7.js.map +0 -1
  604. package/dist/cli-bundle/chunks/focus-LFZ6IDBR.js +0 -106
  605. package/dist/cli-bundle/chunks/focus-LFZ6IDBR.js.map +0 -1
  606. package/dist/cli-bundle/chunks/focus-WNMYCVYA.js +0 -109
  607. package/dist/cli-bundle/chunks/focus-WNMYCVYA.js.map +0 -7
  608. package/dist/cli-bundle/chunks/gc-AETFKZ44.js +0 -398
  609. package/dist/cli-bundle/chunks/gc-AETFKZ44.js.map +0 -7
  610. package/dist/cli-bundle/chunks/gc-RLBP4QVN.js +0 -388
  611. package/dist/cli-bundle/chunks/gc-RLBP4QVN.js.map +0 -1
  612. package/dist/cli-bundle/chunks/get-NH2MPBCI.js +0 -283
  613. package/dist/cli-bundle/chunks/get-NH2MPBCI.js.map +0 -1
  614. package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js +0 -286
  615. package/dist/cli-bundle/chunks/get-P4ZQXCPZ.js.map +0 -7
  616. package/dist/cli-bundle/chunks/health-3GVPMQBL.js +0 -1612
  617. package/dist/cli-bundle/chunks/health-3GVPMQBL.js.map +0 -1
  618. package/dist/cli-bundle/chunks/health-DNTM72GJ.js +0 -1615
  619. package/dist/cli-bundle/chunks/health-DNTM72GJ.js.map +0 -7
  620. package/dist/cli-bundle/chunks/history-RYKLC72X.js +0 -20
  621. package/dist/cli-bundle/chunks/history-SGPYRAFT.js +0 -24
  622. package/dist/cli-bundle/chunks/history-compact-3F6VELO7.js +0 -565
  623. package/dist/cli-bundle/chunks/history-compact-3F6VELO7.js.map +0 -7
  624. package/dist/cli-bundle/chunks/history-compact-656Y2TN4.js +0 -555
  625. package/dist/cli-bundle/chunks/history-compact-656Y2TN4.js.map +0 -1
  626. package/dist/cli-bundle/chunks/history-redact-4H3FCKF3.js +0 -21
  627. package/dist/cli-bundle/chunks/history-redact-54ICFKXM.js +0 -25
  628. package/dist/cli-bundle/chunks/history-repair-4N6SDVHK.js +0 -281
  629. package/dist/cli-bundle/chunks/history-repair-4N6SDVHK.js.map +0 -7
  630. package/dist/cli-bundle/chunks/history-repair-EVTO6LIH.js +0 -278
  631. package/dist/cli-bundle/chunks/history-repair-EVTO6LIH.js.map +0 -1
  632. package/dist/cli-bundle/chunks/init-RPIPQUNV.js +0 -32
  633. package/dist/cli-bundle/chunks/init-SKQAESQS.js +0 -28
  634. package/dist/cli-bundle/chunks/learnings-2HTPZNGZ.js +0 -48
  635. package/dist/cli-bundle/chunks/learnings-2HTPZNGZ.js.map +0 -7
  636. package/dist/cli-bundle/chunks/learnings-YBIHY3D6.js +0 -45
  637. package/dist/cli-bundle/chunks/learnings-YBIHY3D6.js.map +0 -1
  638. package/dist/cli-bundle/chunks/list-64LHZ3HM.js +0 -32
  639. package/dist/cli-bundle/chunks/list-7LXBTEKI.js +0 -36
  640. package/dist/cli-bundle/chunks/next-7ODPAQ4U.js +0 -306
  641. package/dist/cli-bundle/chunks/next-7ODPAQ4U.js.map +0 -7
  642. package/dist/cli-bundle/chunks/next-ODJUM4ZM.js +0 -303
  643. package/dist/cli-bundle/chunks/next-ODJUM4ZM.js.map +0 -1
  644. package/dist/cli-bundle/chunks/notes-72YXN5JX.js +0 -48
  645. package/dist/cli-bundle/chunks/notes-72YXN5JX.js.map +0 -7
  646. package/dist/cli-bundle/chunks/notes-NJ7IQJX4.js +0 -45
  647. package/dist/cli-bundle/chunks/notes-NJ7IQJX4.js.map +0 -1
  648. package/dist/cli-bundle/chunks/plan-R4NDQ27E.js +0 -1366
  649. package/dist/cli-bundle/chunks/plan-R4NDQ27E.js.map +0 -7
  650. package/dist/cli-bundle/chunks/plan-XWY5T67S.js +0 -1363
  651. package/dist/cli-bundle/chunks/plan-XWY5T67S.js.map +0 -1
  652. package/dist/cli-bundle/chunks/profile-XQWEQKS3.js +0 -397
  653. package/dist/cli-bundle/chunks/profile-XQWEQKS3.js.map +0 -1
  654. package/dist/cli-bundle/chunks/profile-YRDHLMRO.js +0 -400
  655. package/dist/cli-bundle/chunks/profile-YRDHLMRO.js.map +0 -7
  656. package/dist/cli-bundle/chunks/register-list-query-5H66WFYF.js +0 -419
  657. package/dist/cli-bundle/chunks/register-list-query-FB3FNDLZ.js +0 -409
  658. package/dist/cli-bundle/chunks/register-mutation-UJO23C7R.js +0 -1256
  659. package/dist/cli-bundle/chunks/register-mutation-Z2ETYHKS.js +0 -1273
  660. package/dist/cli-bundle/chunks/register-operations-A3XAM5J7.js +0 -513
  661. package/dist/cli-bundle/chunks/register-operations-A3XAM5J7.js.map +0 -1
  662. package/dist/cli-bundle/chunks/register-operations-SG7HBSUP.js +0 -516
  663. package/dist/cli-bundle/chunks/register-operations-SG7HBSUP.js.map +0 -7
  664. package/dist/cli-bundle/chunks/register-setup-I45OGJUV.js +0 -323
  665. package/dist/cli-bundle/chunks/register-setup-I45OGJUV.js.map +0 -1
  666. package/dist/cli-bundle/chunks/register-setup-K6U3NVY5.js +0 -326
  667. package/dist/cli-bundle/chunks/register-setup-K6U3NVY5.js.map +0 -7
  668. package/dist/cli-bundle/chunks/restore-PXOFL6AM.js +0 -19
  669. package/dist/cli-bundle/chunks/restore-YJ2ET6AT.js +0 -23
  670. package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js +0 -91
  671. package/dist/cli-bundle/chunks/scheduling-shortcuts-SSC4MYWQ.js.map +0 -7
  672. package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js +0 -88
  673. package/dist/cli-bundle/chunks/scheduling-shortcuts-ULRG7MNP.js.map +0 -1
  674. package/dist/cli-bundle/chunks/schema-2PUXCZ25.js +0 -74
  675. package/dist/cli-bundle/chunks/schema-Y6DXXK2F.js +0 -78
  676. package/dist/cli-bundle/chunks/search-3S72CTD6.js +0 -38
  677. package/dist/cli-bundle/chunks/search-WNUNBQXO.js +0 -34
  678. package/dist/cli-bundle/chunks/stats-IJYTRQGV.js +0 -250
  679. package/dist/cli-bundle/chunks/stats-IJYTRQGV.js.map +0 -7
  680. package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js +0 -240
  681. package/dist/cli-bundle/chunks/stats-L2D5Y2O5.js.map +0 -1
  682. package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js +0 -309
  683. package/dist/cli-bundle/chunks/telemetry-L2CVOKVN.js.map +0 -7
  684. package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js +0 -306
  685. package/dist/cli-bundle/chunks/telemetry-QBYWQA76.js.map +0 -1
  686. package/dist/cli-bundle/chunks/test-DQ2QFJ7W.js +0 -45
  687. package/dist/cli-bundle/chunks/test-W7QBLVJS.js +0 -41
  688. package/dist/cli-bundle/chunks/test-all-636NTRTT.js +0 -434
  689. package/dist/cli-bundle/chunks/test-all-636NTRTT.js.map +0 -1
  690. package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js +0 -437
  691. package/dist/cli-bundle/chunks/test-all-DWYK3RG6.js.map +0 -7
  692. package/dist/cli-bundle/chunks/test-runs-245OINZR.js +0 -28
  693. package/dist/cli-bundle/chunks/test-runs-ZRD4GCTT.js +0 -24
  694. package/dist/cli-bundle/chunks/update-SFLZPJXX.js +0 -30
  695. package/dist/cli-bundle/chunks/update-SJZ6S77U.js +0 -26
  696. package/dist/cli-bundle/chunks/update-many-DC7X3EWM.js +0 -671
  697. package/dist/cli-bundle/chunks/update-many-DC7X3EWM.js.map +0 -7
  698. package/dist/cli-bundle/chunks/update-many-SLLAMHT7.js +0 -668
  699. package/dist/cli-bundle/chunks/update-many-SLLAMHT7.js.map +0 -1
  700. package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js +0 -290
  701. package/dist/cli-bundle/chunks/upgrade-HFFXLZJA.js.map +0 -7
  702. package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js +0 -287
  703. package/dist/cli-bundle/chunks/upgrade-UYQKM7RF.js.map +0 -1
  704. package/dist/cli-bundle/chunks/validate-PA4FDTOV.js +0 -2143
  705. package/dist/cli-bundle/chunks/validate-PA4FDTOV.js.map +0 -7
  706. package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js +0 -2105
  707. package/dist/cli-bundle/chunks/validate-Z7L75YEJ.js.map +0 -1
  708. /package/dist/cli-bundle/chunks/{activity-4XQIDNM5.js.map → activity-WJCGCYPU.js.map} +0 -0
  709. /package/dist/cli-bundle/chunks/{activity-YKAKZTZ4.js.map → activity-Z6QUAUSG.js.map} +0 -0
  710. /package/dist/cli-bundle/chunks/{close-3YRR3XY6.js.map → aggregate-BDM6EIAR.js.map} +0 -0
  711. /package/dist/cli-bundle/chunks/{close-OB2Y4QP5.js.map → aggregate-VQ2DHU3S.js.map} +0 -0
  712. /package/dist/cli-bundle/chunks/{context-WLA6IAWE.js.map → append-BGML6VLD.js.map} +0 -0
  713. /package/dist/cli-bundle/chunks/{context-4OQGIPSO.js.map → append-RKJYPU74.js.map} +0 -0
  714. /package/dist/cli-bundle/chunks/{chunk-YFIE7YK6.js.map → chunk-22KBU3MW.js.map} +0 -0
  715. /package/dist/cli-bundle/chunks/{chunk-DLQ4ZTCU.js.map → chunk-24YG75HI.js.map} +0 -0
  716. /package/dist/cli-bundle/chunks/{chunk-KLG4ZULO.js.map → chunk-2XG4IZON.js.map} +0 -0
  717. /package/dist/cli-bundle/chunks/{chunk-FJRKQREY.js.map → chunk-3GCS5SKL.js.map} +0 -0
  718. /package/dist/cli-bundle/chunks/{chunk-5B3X4Y22.js.map → chunk-3KTN6IBA.js.map} +0 -0
  719. /package/dist/cli-bundle/chunks/{chunk-YMABYTNG.js.map → chunk-3UJRFJ5R.js.map} +0 -0
  720. /package/dist/cli-bundle/chunks/{chunk-YSAH5FY5.js.map → chunk-3VHSI5FL.js.map} +0 -0
  721. /package/dist/cli-bundle/chunks/{chunk-7EQNAZX2.js.map → chunk-46CUF5L6.js.map} +0 -0
  722. /package/dist/cli-bundle/chunks/{chunk-75U6M5ZD.js.map → chunk-4IWYTWGF.js.map} +0 -0
  723. /package/dist/cli-bundle/chunks/{chunk-VZIYHZDX.js.map → chunk-5GZ7TDD6.js.map} +0 -0
  724. /package/dist/cli-bundle/chunks/{chunk-3U3VEWK6.js.map → chunk-5VAA4YHR.js.map} +0 -0
  725. /package/dist/cli-bundle/chunks/{chunk-3PL6LEKP.js.map → chunk-64YKRTSV.js.map} +0 -0
  726. /package/dist/cli-bundle/chunks/{chunk-ABRA3BHY.js.map → chunk-6LLVNJXT.js.map} +0 -0
  727. /package/dist/cli-bundle/chunks/{chunk-EEY54JMF.js.map → chunk-7DT4WSH2.js.map} +0 -0
  728. /package/dist/cli-bundle/chunks/{chunk-7MDXZAZS.js.map → chunk-7WBAJSS6.js.map} +0 -0
  729. /package/dist/cli-bundle/chunks/{chunk-AAEQMOC6.js.map → chunk-AGHMOTGM.js.map} +0 -0
  730. /package/dist/cli-bundle/chunks/{chunk-OWTIRHX4.js.map → chunk-ALFPSEWO.js.map} +0 -0
  731. /package/dist/cli-bundle/chunks/{chunk-T3ABIMGW.js.map → chunk-AZYGZGGI.js.map} +0 -0
  732. /package/dist/cli-bundle/chunks/{chunk-3JZNEQBA.js.map → chunk-B6DUFX6H.js.map} +0 -0
  733. /package/dist/cli-bundle/chunks/{chunk-OESSOFJ4.js.map → chunk-C5JBZRPU.js.map} +0 -0
  734. /package/dist/cli-bundle/chunks/{chunk-YPPVU5GX.js.map → chunk-CFB33L7W.js.map} +0 -0
  735. /package/dist/cli-bundle/chunks/{chunk-5J2XPTAD.js.map → chunk-CL36D4PC.js.map} +0 -0
  736. /package/dist/cli-bundle/chunks/{chunk-IJ6CO3JV.js.map → chunk-D2XRLB55.js.map} +0 -0
  737. /package/dist/cli-bundle/chunks/{chunk-MNZ7DRNC.js.map → chunk-DEWEK6AN.js.map} +0 -0
  738. /package/dist/cli-bundle/chunks/{chunk-US3T3W5J.js.map → chunk-E3SZTQ4K.js.map} +0 -0
  739. /package/dist/cli-bundle/chunks/{chunk-C3PMDWGX.js.map → chunk-EGY6JBQ3.js.map} +0 -0
  740. /package/dist/cli-bundle/chunks/{chunk-JLA7EVYV.js.map → chunk-EKFNL33R.js.map} +0 -0
  741. /package/dist/cli-bundle/chunks/{chunk-57C2RLW5.js.map → chunk-ENGQOEUY.js.map} +0 -0
  742. /package/dist/cli-bundle/chunks/{chunk-7QH7DHUB.js.map → chunk-EOKXK3R3.js.map} +0 -0
  743. /package/dist/cli-bundle/chunks/{chunk-ZCJAA3JK.js.map → chunk-F3K4JGFD.js.map} +0 -0
  744. /package/dist/cli-bundle/chunks/{chunk-DRBV5UC2.js.map → chunk-FLZSGSQR.js.map} +0 -0
  745. /package/dist/cli-bundle/chunks/{chunk-Y76TWC45.js.map → chunk-FT3QTERD.js.map} +0 -0
  746. /package/dist/cli-bundle/chunks/{chunk-HK72NWAD.js.map → chunk-G24G7ZAV.js.map} +0 -0
  747. /package/dist/cli-bundle/chunks/{chunk-K3AGVXSF.js.map → chunk-G64OCSKU.js.map} +0 -0
  748. /package/dist/cli-bundle/chunks/{chunk-QHZO65XW.js.map → chunk-GANUTS7W.js.map} +0 -0
  749. /package/dist/cli-bundle/chunks/{chunk-WISPVC2E.js.map → chunk-GBAX2ZAQ.js.map} +0 -0
  750. /package/dist/cli-bundle/chunks/{chunk-RCT3YJOK.js.map → chunk-GJ7QC5DJ.js.map} +0 -0
  751. /package/dist/cli-bundle/chunks/{chunk-BVEUCSH2.js.map → chunk-GPLPTGOV.js.map} +0 -0
  752. /package/dist/cli-bundle/chunks/{chunk-YZIR4R3U.js.map → chunk-GZRDYONU.js.map} +0 -0
  753. /package/dist/cli-bundle/chunks/{chunk-7WYXBPYQ.js.map → chunk-IWVU4C2F.js.map} +0 -0
  754. /package/dist/cli-bundle/chunks/{chunk-T3F4DF23.js.map → chunk-IX5BXEMX.js.map} +0 -0
  755. /package/dist/cli-bundle/chunks/{chunk-RX3HQSYG.js.map → chunk-JDDLOQAE.js.map} +0 -0
  756. /package/dist/cli-bundle/chunks/{chunk-YOF5VPKM.js.map → chunk-JJP45OEI.js.map} +0 -0
  757. /package/dist/cli-bundle/chunks/{chunk-TT42JUMF.js.map → chunk-K46RF36U.js.map} +0 -0
  758. /package/dist/cli-bundle/chunks/{chunk-R3ZBLGTC.js.map → chunk-KGFUY7WN.js.map} +0 -0
  759. /package/dist/cli-bundle/chunks/{chunk-NER3KUUS.js.map → chunk-KUOOJR35.js.map} +0 -0
  760. /package/dist/cli-bundle/chunks/{chunk-3Y4OESPP.js.map → chunk-L5PSPMZ4.js.map} +0 -0
  761. /package/dist/cli-bundle/chunks/{chunk-PJ3A56YF.js.map → chunk-LPSSSDJR.js.map} +0 -0
  762. /package/dist/cli-bundle/chunks/{chunk-FDBARR33.js.map → chunk-MA4SM3QZ.js.map} +0 -0
  763. /package/dist/cli-bundle/chunks/{chunk-PPAJG4GB.js.map → chunk-MFAZSEM5.js.map} +0 -0
  764. /package/dist/cli-bundle/chunks/{chunk-5JZ7APJU.js.map → chunk-MFSCBT5Q.js.map} +0 -0
  765. /package/dist/cli-bundle/chunks/{chunk-4OFLJHX6.js.map → chunk-MLIYFOE7.js.map} +0 -0
  766. /package/dist/cli-bundle/chunks/{chunk-ZMD35NYG.js.map → chunk-MUH7A3FD.js.map} +0 -0
  767. /package/dist/cli-bundle/chunks/{chunk-5JE6SMYS.js.map → chunk-MVYWGY2A.js.map} +0 -0
  768. /package/dist/cli-bundle/chunks/{chunk-P5TFTLWW.js.map → chunk-MWMVPCIE.js.map} +0 -0
  769. /package/dist/cli-bundle/chunks/{chunk-T35XLYZF.js.map → chunk-NGXQ3PFT.js.map} +0 -0
  770. /package/dist/cli-bundle/chunks/{chunk-EZFKWSC7.js.map → chunk-NMP5I3I5.js.map} +0 -0
  771. /package/dist/cli-bundle/chunks/{chunk-HJE4JTKQ.js.map → chunk-O6AWCQRQ.js.map} +0 -0
  772. /package/dist/cli-bundle/chunks/{chunk-BFVHCAOO.js.map → chunk-OGWQ2IEP.js.map} +0 -0
  773. /package/dist/cli-bundle/chunks/{chunk-S4APD35C.js.map → chunk-QLMX7SRD.js.map} +0 -0
  774. /package/dist/cli-bundle/chunks/{chunk-MZ7VNEVY.js.map → chunk-RFNYTESG.js.map} +0 -0
  775. /package/dist/cli-bundle/chunks/{chunk-MTTXDAK4.js.map → chunk-SCUR7K7N.js.map} +0 -0
  776. /package/dist/cli-bundle/chunks/{chunk-P5YORJRH.js.map → chunk-SHQY2IDC.js.map} +0 -0
  777. /package/dist/cli-bundle/chunks/{chunk-S5AYOUT5.js.map → chunk-SMB7RV23.js.map} +0 -0
  778. /package/dist/cli-bundle/chunks/{chunk-N7X4WP6L.js.map → chunk-SPZ6DOGY.js.map} +0 -0
  779. /package/dist/cli-bundle/chunks/{chunk-P3VRG72Q.js.map → chunk-SQYJ4HF2.js.map} +0 -0
  780. /package/dist/cli-bundle/chunks/{chunk-4LRVSBO6.js.map → chunk-T42JWV3F.js.map} +0 -0
  781. /package/dist/cli-bundle/chunks/{chunk-NBFCNJ7Q.js.map → chunk-TULGS6X6.js.map} +0 -0
  782. /package/dist/cli-bundle/chunks/{chunk-ZJB3UV5U.js.map → chunk-TZXRBVAM.js.map} +0 -0
  783. /package/dist/cli-bundle/chunks/{chunk-ZD34OFFQ.js.map → chunk-VPIM42PC.js.map} +0 -0
  784. /package/dist/cli-bundle/chunks/{chunk-FGQKEDE4.js.map → chunk-W3DSJQIO.js.map} +0 -0
  785. /package/dist/cli-bundle/chunks/{chunk-4QQ6PM7M.js.map → chunk-W572BIEB.js.map} +0 -0
  786. /package/dist/cli-bundle/chunks/{chunk-Z2CRRZYF.js.map → chunk-WRTENIX3.js.map} +0 -0
  787. /package/dist/cli-bundle/chunks/{chunk-ZAHXPXVY.js.map → chunk-XB7KFVFI.js.map} +0 -0
  788. /package/dist/cli-bundle/chunks/{chunk-PDXT6Q55.js.map → chunk-XG625QP4.js.map} +0 -0
  789. /package/dist/cli-bundle/chunks/{chunk-D3UCE7RW.js.map → chunk-XUC7PI2H.js.map} +0 -0
  790. /package/dist/cli-bundle/chunks/{chunk-N6DNM2FA.js.map → chunk-Y46GD4IX.js.map} +0 -0
  791. /package/dist/cli-bundle/chunks/{chunk-FUM6UMY4.js.map → chunk-Y4M7CPQP.js.map} +0 -0
  792. /package/dist/cli-bundle/chunks/{chunk-HBYZDSK5.js.map → chunk-YN7Y6DQZ.js.map} +0 -0
  793. /package/dist/cli-bundle/chunks/{chunk-YQMMMONE.js.map → chunk-ZGK4L4JM.js.map} +0 -0
  794. /package/dist/cli-bundle/chunks/{chunk-LEKT4K7I.js.map → chunk-ZSUS2OD3.js.map} +0 -0
  795. /package/dist/cli-bundle/chunks/{chunk-TSPKZRRW.js.map → chunk-ZZD4J5XY.js.map} +0 -0
  796. /package/dist/cli-bundle/chunks/{contracts-HXJLKCRI.js.map → claim-RFS7BROJ.js.map} +0 -0
  797. /package/dist/cli-bundle/chunks/{contracts-OJEXMKVW.js.map → claim-XP5AWZ5H.js.map} +0 -0
  798. /package/dist/cli-bundle/chunks/{create-XWWQFQ6S.js.map → close-2SSSHHUZ.js.map} +0 -0
  799. /package/dist/cli-bundle/chunks/{create-WKOZKPQR.js.map → close-GEANHQ2J.js.map} +0 -0
  800. /package/dist/cli-bundle/chunks/{extension-ZF6ZZPOU.js.map → close-many-CMZW7ITN.js.map} +0 -0
  801. /package/dist/cli-bundle/chunks/{extension-NBAH62ML.js.map → close-many-ZFDIG6M7.js.map} +0 -0
  802. /package/dist/cli-bundle/chunks/{history-SGPYRAFT.js.map → comments-MFSYVNNU.js.map} +0 -0
  803. /package/dist/cli-bundle/chunks/{history-RYKLC72X.js.map → comments-XUBPXDYX.js.map} +0 -0
  804. /package/dist/cli-bundle/chunks/{history-redact-4H3FCKF3.js.map → config-D7XQMONX.js.map} +0 -0
  805. /package/dist/cli-bundle/chunks/{history-redact-54ICFKXM.js.map → config-T4FHBSYN.js.map} +0 -0
  806. /package/dist/cli-bundle/chunks/{init-RPIPQUNV.js.map → context-DIU275XI.js.map} +0 -0
  807. /package/dist/cli-bundle/chunks/{init-SKQAESQS.js.map → context-JCOYB4LZ.js.map} +0 -0
  808. /package/dist/cli-bundle/chunks/{list-64LHZ3HM.js.map → contracts-BVO7CSLK.js.map} +0 -0
  809. /package/dist/cli-bundle/chunks/{list-7LXBTEKI.js.map → contracts-NYPEW2G4.js.map} +0 -0
  810. /package/dist/cli-bundle/chunks/{restore-YJ2ET6AT.js.map → copy-32ROBIDL.js.map} +0 -0
  811. /package/dist/cli-bundle/chunks/{restore-PXOFL6AM.js.map → copy-NAGLGMHZ.js.map} +0 -0
  812. /package/dist/cli-bundle/chunks/{schema-2PUXCZ25.js.map → create-4V7SWNBB.js.map} +0 -0
  813. /package/dist/cli-bundle/chunks/{schema-Y6DXXK2F.js.map → create-E77SDCUP.js.map} +0 -0
  814. /package/dist/cli-bundle/chunks/{search-WNUNBQXO.js.map → delete-NQI5OSKN.js.map} +0 -0
  815. /package/dist/cli-bundle/chunks/{search-3S72CTD6.js.map → delete-RA5KTCLB.js.map} +0 -0
  816. /package/dist/cli-bundle/chunks/{test-DQ2QFJ7W.js.map → deps-32SU7HO5.js.map} +0 -0
  817. /package/dist/cli-bundle/chunks/{test-W7QBLVJS.js.map → deps-T7SCWXEX.js.map} +0 -0
  818. /package/dist/cli-bundle/chunks/{test-runs-245OINZR.js.map → docs-RRUPT7O2.js.map} +0 -0
  819. /package/dist/cli-bundle/chunks/{test-runs-ZRD4GCTT.js.map → docs-WL2IWGWV.js.map} +0 -0
  820. /package/dist/cli-bundle/chunks/{update-SJZ6S77U.js.map → eval-NF2J5SHR.js.map} +0 -0
  821. /package/dist/cli-bundle/chunks/{update-SFLZPJXX.js.map → eval-SKDT3MZU.js.map} +0 -0
  822. /package/dist/cli-bundle/chunks/{register-list-query-FB3FNDLZ.js.map → register-list-query-B42JCCOI.js.map} +0 -0
  823. /package/dist/cli-bundle/chunks/{register-list-query-5H66WFYF.js.map → register-list-query-OEYQHFXO.js.map} +0 -0
  824. /package/dist/cli-bundle/chunks/{register-mutation-Z2ETYHKS.js.map → register-mutation-3QXIHCQG.js.map} +0 -0
  825. /package/dist/cli-bundle/chunks/{register-mutation-UJO23C7R.js.map → register-mutation-IAEST26S.js.map} +0 -0
@@ -1,2330 +0,0 @@
1
- import {
2
- collectStaleVectorizationIds
3
- } from "./chunk-VPLDQMW2.js";
4
- import {
5
- applyFilterValueEcho,
6
- buildContentFilterEcho,
7
- buildGovernanceMissingFilterEcho,
8
- collectRuntimeFilterValues,
9
- isStatusAllFilterInput,
10
- matchesRuntimeFilters,
11
- parseStatusFilterCsv,
12
- resolveContentFieldFilters,
13
- resolveMissingMetadataFilters
14
- } from "./chunk-7EQNAZX2.js";
15
- import {
16
- hasContentFieldFilter,
17
- itemMatchesContentFilters
18
- } from "./chunk-R23CSHGI.js";
19
- import {
20
- hasMissingMetadataFilter,
21
- itemMatchesMissingMetadata,
22
- lifecycleClassifierFromStatusRegistry
23
- } from "./chunk-RX3HQSYG.js";
24
- import {
25
- parseLimit,
26
- parsePriority,
27
- parseType
28
- } from "./chunk-EEY54JMF.js";
29
- import {
30
- buildEventCorpus,
31
- buildPlanFlatCorpus,
32
- buildReminderCorpus,
33
- buildSearchCorpus,
34
- executeEmbeddingRequest,
35
- executeVectorQuery,
36
- readVectorizationStatusLedger,
37
- resolveEmbeddingProviders,
38
- resolveSearchCorpusFields,
39
- resolveSettingsWithSemanticRuntimeDefaults,
40
- resolveVectorStores
41
- } from "./chunk-LEKT4K7I.js";
42
- import {
43
- resolveRegisteredSearchProvider,
44
- resolveRegisteredVectorStoreAdapter
45
- } from "./chunk-B5KXLBSJ.js";
46
- import {
47
- collectRegisteredItemFieldNames,
48
- listAllDocumentCandidatesCached,
49
- listAllFrontMatter,
50
- toItemRecord
51
- } from "./chunk-3U3VEWK6.js";
52
- import {
53
- isTerminalStatus,
54
- parseItemDocument
55
- } from "./chunk-EZFKWSC7.js";
56
- import {
57
- compareTimestampStrings,
58
- nowIso,
59
- resolveIsoOrRelative
60
- } from "./chunk-DRBV5UC2.js";
61
- import {
62
- PmCliError,
63
- getActiveExtensionRegistrations,
64
- readSettings,
65
- runActiveOnReadHooks
66
- } from "./chunk-P5YORJRH.js";
67
- import {
68
- EXIT_CODE,
69
- coerceNumberInRange,
70
- coercePositiveInteger,
71
- getItemPath,
72
- getSettingsPath,
73
- isPathWithinDirectory,
74
- pathExists,
75
- resolveGlobalPmRoot,
76
- resolveItemTypeRegistry,
77
- resolvePmRoot,
78
- resolveRuntimeFieldRegistry,
79
- resolveRuntimeStatusRegistry,
80
- toNonEmptyString,
81
- toNonEmptyStringOrUndefined
82
- } from "./chunk-5VVUKE3U.js";
83
-
84
- // dist/cli/commands/search.js
85
- import fs from "node:fs/promises";
86
- import path from "node:path";
87
-
88
- // dist/core/shared/text-normalization.js
89
- !(function() {
90
- try {
91
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
92
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1906f0d8-b6a5-5b7d-9c1b-6c3d0f8f41ae");
93
- } catch (e2) {
94
- }
95
- })();
96
- function normalizeLowercaseWhitespace(value) {
97
- return value.trim().toLowerCase().replace(/\s+/g, " ");
98
- }
99
- function tokenizeAlphaNumeric(value) {
100
- return normalizeLowercaseWhitespace(value).split(/[^a-z0-9]+/).filter((token) => token.length > 0);
101
- }
102
- function jaccardSimilarity(leftTokens, rightTokens) {
103
- if (leftTokens.length === 0 && rightTokens.length === 0) {
104
- return 1;
105
- }
106
- if (leftTokens.length === 0 || rightTokens.length === 0) {
107
- return 0;
108
- }
109
- const leftSet = new Set(leftTokens);
110
- const rightSet = new Set(rightTokens);
111
- let intersection = 0;
112
- for (const token of leftSet) {
113
- if (rightSet.has(token)) {
114
- intersection += 1;
115
- }
116
- }
117
- const union = (/* @__PURE__ */ new Set([...leftSet, ...rightSet])).size;
118
- return intersection / union;
119
- }
120
-
121
- // dist/core/search/relevance.js
122
- !(function() {
123
- try {
124
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
125
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0044e205-8896-534c-a2b1-3045cb9f5544");
126
- } catch (e2) {
127
- }
128
- })();
129
- var DEFAULT_QUERY_EXPANSION_MAX_QUERIES = 4;
130
- var DEFAULT_RERANK_TOP_K = 20;
131
- var MAX_RERANK_TOP_K = 200;
132
- var QUERY_EXPANSION_STOP_WORDS = /* @__PURE__ */ new Set([
133
- "a",
134
- "an",
135
- "and",
136
- "for",
137
- "from",
138
- "in",
139
- "into",
140
- "of",
141
- "on",
142
- "or",
143
- "the",
144
- "to",
145
- "with"
146
- ]);
147
- function dedupeQueries(values, limit) {
148
- const deduped = [];
149
- const seen = /* @__PURE__ */ new Set();
150
- for (const entry of values) {
151
- const normalized = entry.trim().replaceAll(/\s+/g, " ");
152
- if (normalized.length === 0) {
153
- continue;
154
- }
155
- const dedupeKey = normalized.toLowerCase();
156
- if (seen.has(dedupeKey)) {
157
- continue;
158
- }
159
- seen.add(dedupeKey);
160
- deduped.push(normalized);
161
- if (deduped.length >= limit) {
162
- break;
163
- }
164
- }
165
- return deduped;
166
- }
167
- function singularizeSimple(token) {
168
- const normalizedToken = token.toLowerCase();
169
- if (normalizedToken.length > 4 && normalizedToken.endsWith("ies")) {
170
- return `${normalizedToken.slice(0, -3)}y`;
171
- }
172
- if (normalizedToken.length > 4 && (normalizedToken.endsWith("ches") || normalizedToken.endsWith("shes") || normalizedToken.endsWith("xes") || normalizedToken.endsWith("zes") || normalizedToken.endsWith("sses"))) {
173
- return normalizedToken.slice(0, -2);
174
- }
175
- if (normalizedToken.length > 3 && normalizedToken.endsWith("s") && !normalizedToken.endsWith("ss") && !normalizedToken.endsWith("us") && !normalizedToken.endsWith("is") && !normalizedToken.endsWith("as")) {
176
- return normalizedToken.slice(0, -1);
177
- }
178
- return normalizedToken;
179
- }
180
- function pluralizeSimple(token) {
181
- const normalizedToken = token.toLowerCase();
182
- if (normalizedToken.length > 2 && (!normalizedToken.endsWith("s") || normalizedToken.endsWith("ss"))) {
183
- if (normalizedToken.endsWith("y") && !/[aeiou]y$/u.test(normalizedToken)) {
184
- return `${normalizedToken.slice(0, -1)}ies`;
185
- }
186
- if (normalizedToken.endsWith("ch") || normalizedToken.endsWith("sh") || normalizedToken.endsWith("x") || normalizedToken.endsWith("z") || normalizedToken.endsWith("ss")) {
187
- return `${normalizedToken}es`;
188
- }
189
- return `${normalizedToken}s`;
190
- }
191
- return normalizedToken;
192
- }
193
- function buildDeterministicQueryExpansions(query, maxQueries = DEFAULT_QUERY_EXPANSION_MAX_QUERIES) {
194
- const normalizedQuery = query.trim().replaceAll(/\s+/g, " ");
195
- if (normalizedQuery.length === 0) {
196
- return [];
197
- }
198
- const tokens = tokenizeAlphaNumeric(normalizedQuery);
199
- if (tokens.length === 0) {
200
- return [normalizedQuery];
201
- }
202
- const contentTokens = tokens.filter((token) => !QUERY_EXPANSION_STOP_WORDS.has(token.toLowerCase()));
203
- const singularized = tokens.map((token) => singularizeSimple(token));
204
- const pluralized = contentTokens.map((token) => pluralizeSimple(token));
205
- return dedupeQueries([
206
- normalizedQuery,
207
- tokens.join(" "),
208
- contentTokens.join(" "),
209
- singularized.join(" "),
210
- pluralized.join(" ")
211
- ], Math.max(1, maxQueries));
212
- }
213
- function normalizeQueryExpansionOutput(raw) {
214
- const rawQueries = Array.isArray(raw) ? raw : raw?.queries;
215
- if (!Array.isArray(rawQueries)) {
216
- return [];
217
- }
218
- return dedupeQueries(rawQueries.filter((entry) => typeof entry === "string"), DEFAULT_QUERY_EXPANSION_MAX_QUERIES);
219
- }
220
- function mergeQueryExpansions(base, extra, maxQueries) {
221
- return dedupeQueries([...base, ...extra], Math.max(1, maxQueries));
222
- }
223
- function resolveQueryExpansionConfig(settings, fallbackProviderName) {
224
- const search = settings.search;
225
- const queryExpansion = search?.query_expansion;
226
- const configuredProvider = toNonEmptyString(queryExpansion?.provider);
227
- return {
228
- enabled: queryExpansion?.enabled === true,
229
- provider: configuredProvider ?? fallbackProviderName,
230
- max_queries: DEFAULT_QUERY_EXPANSION_MAX_QUERIES
231
- };
232
- }
233
- function resolveRerankConfig(settings, fallbackModel) {
234
- const search = settings.search;
235
- const rerank = search?.rerank;
236
- const configuredModel = toNonEmptyString(rerank?.model);
237
- const configuredTopK = coercePositiveInteger(rerank?.top_k);
238
- const normalizedTopK = configuredTopK ?? DEFAULT_RERANK_TOP_K;
239
- return {
240
- enabled: rerank?.enabled === true,
241
- model: configuredModel ?? fallbackModel,
242
- top_k: Math.min(MAX_RERANK_TOP_K, normalizedTopK)
243
- };
244
- }
245
- function normalizeRerankOutput(raw) {
246
- const rawHits = Array.isArray(raw) ? raw : raw?.hits;
247
- if (!Array.isArray(rawHits)) {
248
- return [];
249
- }
250
- const bestById = /* @__PURE__ */ new Map();
251
- for (const entry of rawHits) {
252
- if (typeof entry !== "object" || entry === null) {
253
- continue;
254
- }
255
- const id = toNonEmptyString(entry.id);
256
- const score = entry.score;
257
- if (!id || typeof score !== "number" || !Number.isFinite(score)) {
258
- continue;
259
- }
260
- const existing = bestById.get(id);
261
- if (existing === void 0 || score > existing) {
262
- bestById.set(id, score);
263
- }
264
- }
265
- const normalized = [...bestById.entries()].map(([id, score]) => ({ id, score }));
266
- normalized.sort((left, right) => {
267
- if (left.score !== right.score) {
268
- return right.score - left.score;
269
- }
270
- return left.id.localeCompare(right.id);
271
- });
272
- return normalized;
273
- }
274
- function dotProduct(left, right) {
275
- const size = left.length;
276
- let result = 0;
277
- for (let index = 0; index < size; index += 1) {
278
- result += left[index] * right[index];
279
- }
280
- return result;
281
- }
282
- function l2Norm(vector) {
283
- let sumSquares = 0;
284
- for (let index = 0; index < vector.length; index += 1) {
285
- sumSquares += vector[index] * vector[index];
286
- }
287
- return Math.sqrt(sumSquares);
288
- }
289
- function cosineSimilarityWithKnownLeftNorm(left, right, leftNorm) {
290
- if (!left || !right || left.length === 0 || right.length === 0 || left.length !== right.length) {
291
- return 0;
292
- }
293
- const numerator = dotProduct(left, right);
294
- const rightNorm = l2Norm(right);
295
- const denominator = leftNorm * rightNorm;
296
- if (!Number.isFinite(numerator) || !Number.isFinite(leftNorm) || !Number.isFinite(rightNorm) || !Number.isFinite(denominator) || denominator === 0) {
297
- return 0;
298
- }
299
- return Math.max(-1, Math.min(1, numerator / denominator));
300
- }
301
- async function rerankCandidatesWithEmbeddings(provider, model, query, candidates, timeoutMs) {
302
- if (candidates.length === 0) {
303
- return /* @__PURE__ */ new Map();
304
- }
305
- const effectiveModel = toNonEmptyString(model) ?? provider.model;
306
- const rerankProvider = effectiveModel === provider.model ? provider : { ...provider, model: effectiveModel };
307
- const payload = [query.trim(), ...candidates.map((entry) => entry.text)];
308
- const vectors = await executeEmbeddingRequest(rerankProvider, payload, timeoutMs ? { timeout_ms: timeoutMs } : {});
309
- const queryVector = vectors[0];
310
- if (!queryVector) {
311
- return /* @__PURE__ */ new Map();
312
- }
313
- const queryNorm = l2Norm(queryVector);
314
- const scoreById = /* @__PURE__ */ new Map();
315
- for (let index = 0; index < candidates.length; index += 1) {
316
- const candidate = candidates[index];
317
- const candidateVector = vectors[index + 1];
318
- if (!candidateVector) {
319
- continue;
320
- }
321
- const similarity = cosineSimilarityWithKnownLeftNorm(queryVector, candidateVector, queryNorm);
322
- scoreById.set(candidate.id, Math.max(0, Math.min(1, (similarity + 1) / 2)));
323
- }
324
- return scoreById;
325
- }
326
-
327
- // dist/core/search/bm25.js
328
- !(function() {
329
- try {
330
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
331
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "57c1eb74-63b5-5208-abe1-98da8308839d");
332
- } catch (e2) {
333
- }
334
- })();
335
- var DEFAULT_BM25_K1 = 1.2;
336
- var DEFAULT_BM25_B = 0.75;
337
- function tokenizeBm25(text) {
338
- return tokenizeAlphaNumeric(text);
339
- }
340
- function buildTermFrequencies(tokens) {
341
- const frequencies = /* @__PURE__ */ new Map();
342
- for (const token of tokens) {
343
- frequencies.set(token, (frequencies.get(token) ?? 0) + 1);
344
- }
345
- return frequencies;
346
- }
347
- function buildBm25Index(documents) {
348
- const stats = [];
349
- const documentFrequency = /* @__PURE__ */ new Map();
350
- let totalLength = 0;
351
- for (const document of documents) {
352
- const tokens = tokenizeBm25(document.text);
353
- const termFrequencies = buildTermFrequencies(tokens);
354
- totalLength += tokens.length;
355
- for (const term of termFrequencies.keys()) {
356
- documentFrequency.set(term, (documentFrequency.get(term) ?? 0) + 1);
357
- }
358
- stats.push({ id: document.id, termFrequencies, length: tokens.length });
359
- }
360
- const documentCount = stats.length;
361
- return {
362
- documents: stats,
363
- documentFrequency,
364
- documentCount,
365
- averageDocumentLength: documentCount > 0 ? totalLength / documentCount : 0
366
- };
367
- }
368
- function inverseDocumentFrequency(documentCount, termDocumentFrequency) {
369
- return Math.log(1 + (documentCount - termDocumentFrequency + 0.5) / (termDocumentFrequency + 0.5));
370
- }
371
- function scoreBm25Query(index, queryTokens, params) {
372
- const scores = /* @__PURE__ */ new Map();
373
- if (index.documentCount === 0 || index.averageDocumentLength === 0) {
374
- return scores;
375
- }
376
- const distinctQueryTerms = [...new Set(queryTokens.filter((token) => token.length > 0))];
377
- if (distinctQueryTerms.length === 0) {
378
- return scores;
379
- }
380
- const idfByTerm = /* @__PURE__ */ new Map();
381
- for (const term of distinctQueryTerms) {
382
- const termDocumentFrequency = index.documentFrequency.get(term);
383
- if (termDocumentFrequency === void 0) {
384
- continue;
385
- }
386
- idfByTerm.set(term, inverseDocumentFrequency(index.documentCount, termDocumentFrequency));
387
- }
388
- if (idfByTerm.size === 0) {
389
- return scores;
390
- }
391
- for (const document of index.documents) {
392
- let score = 0;
393
- for (const [term, idf] of idfByTerm) {
394
- const termFrequency = document.termFrequencies.get(term);
395
- if (termFrequency === void 0) {
396
- continue;
397
- }
398
- const lengthNormalization = 1 - params.b + params.b * document.length / index.averageDocumentLength;
399
- const denominator = termFrequency + params.k1 * lengthNormalization;
400
- score += idf * (termFrequency * (params.k1 + 1) / denominator);
401
- }
402
- if (score > 0) {
403
- scores.set(document.id, score);
404
- }
405
- }
406
- return scores;
407
- }
408
- function resolveClampedParam(candidate, fallback, min, max) {
409
- if (typeof candidate !== "number" || !Number.isFinite(candidate)) {
410
- return fallback;
411
- }
412
- return Math.min(max, Math.max(min, candidate));
413
- }
414
- function flattenSearchCorpusText(corpus) {
415
- const collectValueText = (value) => {
416
- if (typeof value === "string") {
417
- return [value];
418
- }
419
- if (typeof value === "number") {
420
- return [String(value)];
421
- }
422
- if (Array.isArray(value)) {
423
- return value.flatMap(collectValueText);
424
- }
425
- if (typeof value === "object" && value !== null) {
426
- return Object.values(value).flatMap(collectValueText);
427
- }
428
- return [];
429
- };
430
- return collectValueText(Object.values(corpus)).join(" ");
431
- }
432
- function resolveBm25Params(settings) {
433
- const bm25 = settings?.search?.bm25;
434
- return {
435
- k1: resolveClampedParam(bm25?.k1, DEFAULT_BM25_K1, 0, 1e3),
436
- b: resolveClampedParam(bm25?.b, DEFAULT_BM25_B, 0, 1)
437
- };
438
- }
439
-
440
- // dist/cli/commands/search.js
441
- !(function() {
442
- try {
443
- var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
444
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "fe9c6a3a-fb99-53ed-9a6c-8c32bb745364");
445
- } catch (e2) {
446
- }
447
- })();
448
- var DEFAULT_COMPACT_SEARCH_FIELDS = [
449
- "id",
450
- "title",
451
- "status",
452
- "type",
453
- "priority",
454
- "updated_at",
455
- "score",
456
- "matched_fields"
457
- ];
458
- var SEARCH_HIT_FIELD_KEYS = /* @__PURE__ */ new Set(["score", "matched_fields", "highlights"]);
459
- var SEARCH_ITEM_FIELD_KEYS = /* @__PURE__ */ new Set([
460
- "id",
461
- "title",
462
- "description",
463
- "type",
464
- "status",
465
- "priority",
466
- "tags",
467
- "created_at",
468
- "updated_at",
469
- "deadline",
470
- "assignee",
471
- "author",
472
- "estimated_minutes",
473
- "acceptance_criteria",
474
- "dependencies",
475
- "comments",
476
- "notes",
477
- "learnings",
478
- "reminders",
479
- "events",
480
- "files",
481
- "tests",
482
- "docs",
483
- "close_reason",
484
- "parent",
485
- "reviewer",
486
- "risk",
487
- "confidence",
488
- "sprint",
489
- "release",
490
- "blocked_by",
491
- "blocked_reason",
492
- "reporter",
493
- "severity",
494
- "environment",
495
- "repro_steps",
496
- "resolution",
497
- "expected_result",
498
- "actual_result",
499
- "affected_version",
500
- "fixed_version",
501
- "component",
502
- "regression",
503
- "customer_impact",
504
- "definition_of_ready",
505
- "order",
506
- "rank",
507
- "goal",
508
- "objective",
509
- "value",
510
- "impact",
511
- "outcome",
512
- "why_now",
513
- "plan"
514
- ]);
515
- var LONG_QUERY_TOKEN_THRESHOLD = 2;
516
- var LONG_QUERY_TITLE_EXACT_BONUS = 120;
517
- var LONG_QUERY_PHRASE_MULTIPLIER = 6;
518
- var ALL_TERMS_COVERAGE_BONUS = 40;
519
- var EXACT_ID_MATCH_SCORE = 1e3;
520
- var SHORT_ID_MATCH_SCORE = 900;
521
- var HIGHLIGHT_OPEN = "\xAB";
522
- var HIGHLIGHT_CLOSE = "\xBB";
523
- var HIGHLIGHT_SNIPPET_RADIUS = 60;
524
- var INLINE_QUERY_FILTER_FIELDS = ["tag", "status", "type", "priority"];
525
- var COMPACT_SEARCH_VALUE_FILTER_ECHO_ENTRIES = [
526
- {
527
- optionKey: "status",
528
- summaryKey: "status",
529
- normalize: (value) => isStatusAllFilterInput(value) ? "all" : value
530
- },
531
- { optionKey: "type", summaryKey: "type" },
532
- { optionKey: "tag", summaryKey: "tag" },
533
- { optionKey: "priority", summaryKey: "priority" },
534
- { optionKey: "deadlineBefore", summaryKey: "deadline_before" },
535
- { optionKey: "deadlineAfter", summaryKey: "deadline_after" },
536
- { optionKey: "updatedAfter", summaryKey: "updated_after" },
537
- { optionKey: "updatedBefore", summaryKey: "updated_before" },
538
- { optionKey: "createdAfter", summaryKey: "created_after" },
539
- { optionKey: "createdBefore", summaryKey: "created_before" },
540
- { optionKey: "assignee", summaryKey: "assignee" },
541
- { optionKey: "sprint", summaryKey: "sprint" },
542
- { optionKey: "release", summaryKey: "release" },
543
- { optionKey: "parent", summaryKey: "parent" }
544
- ];
545
- function isNonEmptyRecord(value) {
546
- return typeof value === "object" && value !== null && !Array.isArray(value) && Object.keys(value).length > 0;
547
- }
548
- function buildCompactSearchFilterSummary(params) {
549
- const { mode, matchMode, options, includeLinked, titleExact, phraseExact, scoreThreshold, hybridSemanticWeight, runtimeFieldFilters } = params;
550
- const filters = {};
551
- applyFilterValueEcho(filters, options, COMPACT_SEARCH_VALUE_FILTER_ECHO_ENTRIES);
552
- Object.assign(filters, buildGovernanceMissingFilterEcho(options));
553
- Object.assign(filters, buildContentFilterEcho(options));
554
- if (matchMode !== "or") {
555
- filters.match_mode = matchMode;
556
- }
557
- if (includeLinked) {
558
- filters.include_linked = true;
559
- }
560
- if (titleExact) {
561
- filters.title_exact = true;
562
- }
563
- if (phraseExact) {
564
- filters.phrase_exact = true;
565
- }
566
- if (scoreThreshold > 0) {
567
- filters.score_threshold = scoreThreshold;
568
- }
569
- if (mode === "hybrid" && options.semanticWeight !== void 0) {
570
- filters.hybrid_semantic_weight = hybridSemanticWeight;
571
- }
572
- if (options.limit !== void 0) {
573
- filters.limit = options.limit;
574
- }
575
- if (isNonEmptyRecord(runtimeFieldFilters)) {
576
- filters.runtime_filters = runtimeFieldFilters;
577
- }
578
- return filters;
579
- }
580
- function buildVerboseSearchFilters(params) {
581
- const { effectiveMode, matchMode, options, includeLinked, titleExact, phraseExact, scoreThreshold, hybridSemanticWeight, queryExpansion, rerank, runtimeFieldFilters } = params;
582
- return {
583
- mode: effectiveMode,
584
- match_mode: matchMode,
585
- status: isStatusAllFilterInput(options.status) ? "all" : valueOrNull(options.status),
586
- type: valueOrNull(options.type),
587
- tag: valueOrNull(options.tag),
588
- priority: valueOrNull(options.priority),
589
- deadline_before: valueOrNull(options.deadlineBefore),
590
- deadline_after: valueOrNull(options.deadlineAfter),
591
- updated_after: valueOrNull(options.updatedAfter),
592
- updated_before: valueOrNull(options.updatedBefore),
593
- created_after: valueOrNull(options.createdAfter),
594
- created_before: valueOrNull(options.createdBefore),
595
- assignee: valueOrNull(options.assignee),
596
- sprint: valueOrNull(options.sprint),
597
- release: valueOrNull(options.release),
598
- parent: valueOrNull(options.parent),
599
- ...buildGovernanceMissingFilterEcho(options),
600
- ...buildContentFilterEcho(options),
601
- include_linked: includeLinked,
602
- title_exact: titleExact,
603
- phrase_exact: phraseExact,
604
- score_threshold: scoreThreshold,
605
- hybrid_semantic_weight: effectiveMode === "hybrid" ? hybridSemanticWeight : null,
606
- query_expansion_enabled: queryExpansion.enabled,
607
- query_expansion_provider: queryExpansion.provider,
608
- rerank_enabled: rerank.enabled,
609
- rerank_model: rerank.model,
610
- rerank_top_k: rerank.top_k,
611
- limit: valueOrNull(options.limit),
612
- runtime_filters: runtimeFieldFilters
613
- };
614
- }
615
- function valueOrNull(value) {
616
- return value ?? null;
617
- }
618
- function collectErrorCauseCodes(error) {
619
- const codes = [];
620
- let current = error;
621
- for (let depth = 0; depth < 5 && current && typeof current === "object"; depth += 1) {
622
- const code = current.code;
623
- if (typeof code === "string") {
624
- codes.push(code.toLowerCase());
625
- }
626
- current = current.cause;
627
- }
628
- return codes.join(" ");
629
- }
630
- function classifyImplicitSemanticFallbackReason(error) {
631
- const message = (error instanceof Error ? error.message : String(error)).toLowerCase();
632
- const causeCodes = collectErrorCauseCodes(error);
633
- const haystack = `${message} ${causeCodes}`;
634
- if (haystack.includes("timed out") || haystack.includes("timeout") || haystack.includes("etimedout")) {
635
- return "timeout";
636
- }
637
- if (haystack.includes("econnrefused") || haystack.includes("connection refused") || haystack.includes("connect ") || haystack.includes("enotfound") || haystack.includes("eai_again") || haystack.includes("econnreset") || haystack.includes("fetch failed")) {
638
- return "connection";
639
- }
640
- return "error";
641
- }
642
- function buildExplicitSemanticFallbackWarning(requestedMode, error) {
643
- const reason = classifyImplicitSemanticFallbackReason(error);
644
- return `search_${requestedMode}_fallback:${reason}:using_keyword_mode`;
645
- }
646
- async function maybeEmitVectorIndexStaleWarning(pmRoot, filteredDocuments, warnings) {
647
- try {
648
- const ledger = await readVectorizationStatusLedger(pmRoot);
649
- if (ledger.warnings.length > 0) {
650
- warnings.push(...ledger.warnings);
651
- }
652
- const staleIds = collectStaleVectorizationIds(filteredDocuments.map((document) => ({
653
- id: document.metadata.id,
654
- updated_at: document.metadata.updated_at
655
- })), ledger.entries);
656
- if (staleIds.length === 0) {
657
- return;
658
- }
659
- warnings.push(`vector_index_stale:${staleIds.length}`);
660
- process.stderr.write(`[pm] warning: ${staleIds.length} item${staleIds.length === 1 ? " is" : "s are"} new or modified since the last reindex and ${staleIds.length === 1 ? "is" : "are"} NOT in the semantic index yet \u2014 they will be missing from semantic/hybrid results until you run 'pm reindex --mode hybrid'. (Write-time embedding is governed by search.mutation_refresh_policy; staleness means the embed was skipped, failed, or the backend was unreachable.)
661
- `);
662
- } catch {
663
- }
664
- }
665
- function parseMode(raw, _context) {
666
- if (raw === void 0) {
667
- return "keyword";
668
- }
669
- const normalized = raw.trim().toLowerCase();
670
- if (normalized !== "keyword" && normalized !== "semantic" && normalized !== "hybrid") {
671
- throw new PmCliError("Search mode must be one of keyword|semantic|hybrid", EXIT_CODE.USAGE);
672
- }
673
- return normalized;
674
- }
675
- function parseIncludeLinked(raw) {
676
- return raw === true;
677
- }
678
- function parseTitleExact(raw) {
679
- return raw === true;
680
- }
681
- function parsePhraseExact(raw) {
682
- return raw === true;
683
- }
684
- function parseSemanticWeightOverride(raw) {
685
- return coerceNumberInRange(raw, 0, 1) ?? void 0;
686
- }
687
- function parseMatchMode(raw) {
688
- if (raw === void 0) {
689
- return "or";
690
- }
691
- const normalized = raw.trim().toLowerCase();
692
- if (normalized !== "and" && normalized !== "or" && normalized !== "exact") {
693
- throw new PmCliError("Search --match-mode must be one of and|or|exact", EXIT_CODE.USAGE);
694
- }
695
- return normalized;
696
- }
697
- function parseMinScoreOverride(raw) {
698
- if (raw === void 0 || raw === null || raw === "") {
699
- return void 0;
700
- }
701
- const parsed = typeof raw === "number" ? raw : Number(String(raw).trim());
702
- if (!Number.isFinite(parsed) || parsed < 0) {
703
- throw new PmCliError("Search --min-score must be a finite number >= 0", EXIT_CODE.USAGE);
704
- }
705
- return parsed;
706
- }
707
- function parseTimestampWindow(raw, fieldLabel) {
708
- if (raw == null)
709
- return void 0;
710
- const value = String(raw).trim();
711
- if (value.length === 0)
712
- return void 0;
713
- return resolveIsoOrRelative(value, /* @__PURE__ */ new Date(), fieldLabel);
714
- }
715
- function normalizeSearchPhrase(value) {
716
- return value.toLowerCase().replace(/\s+/g, " ").trim();
717
- }
718
- function parseDeadline(raw, fieldLabel) {
719
- if (raw === void 0)
720
- return void 0;
721
- return resolveIsoOrRelative(raw, /* @__PURE__ */ new Date(), fieldLabel);
722
- }
723
- function parseFieldSelectors(raw) {
724
- if (raw === void 0) {
725
- return void 0;
726
- }
727
- const selectors = raw.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0);
728
- if (selectors.length === 0) {
729
- throw new PmCliError("Search --fields requires a comma-separated list of field names", EXIT_CODE.USAGE);
730
- }
731
- return [...new Set(selectors)];
732
- }
733
- function parseProjectionConfig(options) {
734
- const compactRequested = options.compact === true;
735
- const fullRequested = options.full === true;
736
- const fieldSelectors = parseFieldSelectors(options.fields);
737
- const enabledModes = Number(compactRequested) + Number(fullRequested) + Number(fieldSelectors !== void 0);
738
- if (enabledModes > 1) {
739
- throw new PmCliError("Search projection options are mutually exclusive. Use one of --compact, --full, or --fields.", EXIT_CODE.USAGE);
740
- }
741
- if (compactRequested) {
742
- return {
743
- mode: "compact",
744
- fields: [...DEFAULT_COMPACT_SEARCH_FIELDS]
745
- };
746
- }
747
- if (fullRequested) {
748
- return {
749
- mode: "full",
750
- fields: []
751
- };
752
- }
753
- if (fieldSelectors) {
754
- return {
755
- mode: "fields",
756
- fields: fieldSelectors
757
- };
758
- }
759
- return {
760
- mode: "full",
761
- fields: []
762
- };
763
- }
764
- var _testOnlySearchCommand = {
765
- applyFilters,
766
- applyExactQueryFilters,
767
- applyInlineQueryFilters,
768
- buildHitHighlights,
769
- buildVerboseSearchFilters,
770
- buildExplicitSemanticFallbackWarning,
771
- buildCompactSearchFilterSummary,
772
- buildHybridLexicalScore,
773
- buildRerankCorpus,
774
- buildSemanticHits,
775
- classifyImplicitSemanticFallbackReason,
776
- collectErrorCauseCodes,
777
- collectExactPhraseFields,
778
- collectLinkedPaths,
779
- combineHybridHits,
780
- computeBuiltInBm25Hits,
781
- computeSemanticOrHybridHits,
782
- resolveBuiltInBm25Mode,
783
- countOccurrences,
784
- dependencyEntries,
785
- documentContainsExactPhrase,
786
- emptySearchResult,
787
- highlightFieldSnippet,
788
- loadDocuments,
789
- markTokenRuns,
790
- parseInlineQueryFilters,
791
- maybeEmitVectorIndexStaleWarning,
792
- loadLinkedCorpus,
793
- mergeVectorHitsById,
794
- normalizeExtensionProviderHits,
795
- normalizeScoreMap,
796
- parseProjectionConfig,
797
- parseTimestampWindow,
798
- parseTokens,
799
- readSearchFieldValue,
800
- requireSemanticDependencies,
801
- resolveExtensionSearchProvider,
802
- resolveExtensionSearchProviderByName,
803
- resolveExtensionVectorAdapter,
804
- resolveLinkedCorpusRoots,
805
- scoreDocument,
806
- sortHits,
807
- stringArray,
808
- textEntries,
809
- validateSearchProjectionFields
810
- };
811
- function validateSearchProjectionFields(projection, runtimeFieldRegistry) {
812
- if (projection.mode !== "fields") {
813
- return;
814
- }
815
- const runtimeKeys = new Set(runtimeFieldRegistry.definitions.flatMap((field) => [field.key, field.metadata_key]));
816
- const unknown = projection.fields.filter((field) => {
817
- const normalized = field.trim();
818
- const itemKey = normalized.startsWith("item.") ? normalized.slice("item.".length) : normalized;
819
- return !SEARCH_HIT_FIELD_KEYS.has(normalized) && !SEARCH_ITEM_FIELD_KEYS.has(itemKey) && !runtimeKeys.has(itemKey);
820
- });
821
- if (unknown.length > 0) {
822
- throw new PmCliError(`Unknown search --fields value(s): ${unknown.join(", ")}`, EXIT_CODE.USAGE, {
823
- examples: [
824
- "pm search <query> --fields id,title,status,score",
825
- "pm search <query> --fields id,title,item.description,matched_fields"
826
- ],
827
- nextSteps: ["Use item.<field> for explicit item metadata fields, or run pm search --help for projection examples."]
828
- });
829
- }
830
- }
831
- function parseTokens(query) {
832
- const normalized = normalizeSearchPhrase(query);
833
- if (!normalized) {
834
- throw new PmCliError("Search query must not be empty", EXIT_CODE.USAGE);
835
- }
836
- return normalized.split(/\s+/).filter(Boolean);
837
- }
838
- function parseInlineQueryFilters(query) {
839
- const inlineFilters = {};
840
- const residualTokens = [];
841
- for (const token of query.split(/\s+/).filter((entry) => entry.length > 0)) {
842
- const separatorIndex = token.indexOf(":");
843
- const field = separatorIndex > 0 ? token.slice(0, separatorIndex).toLowerCase() : "";
844
- const value = separatorIndex > 0 ? token.slice(separatorIndex + 1) : "";
845
- const matchedField = INLINE_QUERY_FILTER_FIELDS.includes(field) ? field : void 0;
846
- if (matchedField && value.length > 0 && inlineFilters[matchedField] === void 0) {
847
- inlineFilters[matchedField] = value;
848
- continue;
849
- }
850
- residualTokens.push(token);
851
- }
852
- return {
853
- residualQuery: residualTokens.join(" "),
854
- inlineFilters
855
- };
856
- }
857
- function applyInlineQueryFilters(options, inlineFilters, warnings) {
858
- const merged = { ...options };
859
- for (const field of INLINE_QUERY_FILTER_FIELDS) {
860
- const inlineValue = inlineFilters[field];
861
- if (inlineValue === void 0) {
862
- continue;
863
- }
864
- if (toNonEmptyStringOrUndefined(merged[field]) !== void 0) {
865
- warnings.push(`search_inline_filter_ignored:${field}:flag_takes_precedence`);
866
- continue;
867
- }
868
- merged[field] = inlineValue;
869
- }
870
- return merged;
871
- }
872
- function stringArray(value) {
873
- return Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : [];
874
- }
875
- function textEntries(value) {
876
- return Array.isArray(value) ? value.filter((entry) => typeof entry === "object" && entry !== null && typeof entry.text === "string") : [];
877
- }
878
- function dependencyEntries(value) {
879
- return Array.isArray(value) ? value.filter((entry) => typeof entry === "object" && entry !== null && typeof entry.id === "string" && typeof entry.kind === "string") : [];
880
- }
881
- function collectExactPhraseFields(document) {
882
- const item = document.metadata;
883
- return [
884
- item.title,
885
- item.description,
886
- item.status,
887
- stringArray(item.tags).join(" "),
888
- document.body,
889
- textEntries(item.comments).map((entry) => entry.text).join(" "),
890
- textEntries(item.notes).map((entry) => entry.text).join(" "),
891
- textEntries(item.learnings).map((entry) => entry.text).join(" "),
892
- buildReminderCorpus(item).join(" "),
893
- buildEventCorpus(item).join(" "),
894
- dependencyEntries(item.dependencies).map((entry) => `${entry.id} ${entry.kind}`).join(" "),
895
- buildPlanFlatCorpus(item)
896
- ];
897
- }
898
- function documentContainsExactPhrase(document, normalizedQuery) {
899
- return collectExactPhraseFields(document).some((fieldValue) => normalizeSearchPhrase(fieldValue).includes(normalizedQuery));
900
- }
901
- function applyExactQueryFilters(items, normalizedQuery, options) {
902
- if (!options.titleExact && !options.phraseExact) {
903
- return items;
904
- }
905
- return items.filter((document) => {
906
- if (options.titleExact && normalizeSearchPhrase(document.metadata.title) !== normalizedQuery) {
907
- return false;
908
- }
909
- if (options.phraseExact && !documentContainsExactPhrase(document, normalizedQuery)) {
910
- return false;
911
- }
912
- return true;
913
- });
914
- }
915
- function assertSearchAssigneeFilter(assigneeFilter) {
916
- if (assigneeFilter && (assigneeFilter.toLowerCase() === "none" || assigneeFilter.toLowerCase() === "null")) {
917
- throw new PmCliError('--assignee no longer accepts "none" or "null".', EXIT_CODE.USAGE);
918
- }
919
- }
920
- function resolveSearchMetadataFilterSet(options, typeRegistry, statusFilter) {
921
- const assigneeFilter = options.assignee?.trim();
922
- assertSearchAssigneeFilter(assigneeFilter);
923
- const missingMetadataFilters = resolveMissingMetadataFilters(options);
924
- const contentFieldFilters = resolveContentFieldFilters(options);
925
- return {
926
- typeFilter: parseType(options.type, typeRegistry),
927
- tagFilter: options.tag?.trim().toLowerCase(),
928
- priorityFilter: parsePriority(options.priority),
929
- deadlineBefore: parseDeadline(options.deadlineBefore, "deadline-before"),
930
- deadlineAfter: parseDeadline(options.deadlineAfter, "deadline-after"),
931
- updatedAfter: parseTimestampWindow(options.updatedAfter, "updated-after"),
932
- updatedBefore: parseTimestampWindow(options.updatedBefore, "updated-before"),
933
- createdAfter: parseTimestampWindow(options.createdAfter, "created-after"),
934
- createdBefore: parseTimestampWindow(options.createdBefore, "created-before"),
935
- assigneeFilter,
936
- sprintFilter: options.sprint?.trim(),
937
- releaseFilter: options.release?.trim(),
938
- parentFilter: options.parent?.trim(),
939
- statusSet: statusFilter && statusFilter.length > 0 ? new Set(statusFilter) : void 0,
940
- missingMetadataFilters,
941
- missingMetadataActive: hasMissingMetadataFilter(missingMetadataFilters),
942
- contentFieldFilters,
943
- contentFiltersActive: hasContentFieldFilter(contentFieldFilters)
944
- };
945
- }
946
- function matchesScalarSearchFilters(item, filters) {
947
- return matchesIdentitySearchFilters(item, filters) && matchesTimestampSearchFilters(item, filters) && matchesOwnerSearchFilters(item, filters);
948
- }
949
- function matchesIdentitySearchFilters(item, filters) {
950
- if (filters.statusSet && !filters.statusSet.has(item.status))
951
- return false;
952
- if (filters.typeFilter && item.type !== filters.typeFilter)
953
- return false;
954
- if (filters.tagFilter && !stringArray(item.tags).includes(filters.tagFilter))
955
- return false;
956
- if (filters.priorityFilter !== void 0 && item.priority !== filters.priorityFilter)
957
- return false;
958
- return true;
959
- }
960
- function matchesTimestampSearchFilters(item, filters) {
961
- if (filters.deadlineBefore && (!item.deadline || compareTimestampStrings(item.deadline, filters.deadlineBefore) > 0))
962
- return false;
963
- if (filters.deadlineAfter && (!item.deadline || compareTimestampStrings(item.deadline, filters.deadlineAfter) < 0))
964
- return false;
965
- if (filters.updatedAfter && compareTimestampStrings(item.updated_at, filters.updatedAfter) < 0)
966
- return false;
967
- if (filters.updatedBefore && compareTimestampStrings(item.updated_at, filters.updatedBefore) > 0)
968
- return false;
969
- if (filters.createdAfter && compareTimestampStrings(item.created_at, filters.createdAfter) < 0)
970
- return false;
971
- if (filters.createdBefore && compareTimestampStrings(item.created_at, filters.createdBefore) > 0)
972
- return false;
973
- return true;
974
- }
975
- function matchesOwnerSearchFilters(item, filters) {
976
- if (filters.assigneeFilter !== void 0 && item.assignee !== filters.assigneeFilter)
977
- return false;
978
- if (filters.sprintFilter !== void 0 && item.sprint !== filters.sprintFilter)
979
- return false;
980
- if (filters.releaseFilter !== void 0 && item.release !== filters.releaseFilter)
981
- return false;
982
- if (filters.parentFilter !== void 0 && item.parent !== filters.parentFilter)
983
- return false;
984
- return true;
985
- }
986
- function matchesSearchMetadataFilters(document, filters, runtimeFieldFilters, lifecycleClassifier) {
987
- const item = document.metadata;
988
- if (!matchesScalarSearchFilters(item, filters)) {
989
- return false;
990
- }
991
- if (!matchesRuntimeFilters(item, runtimeFieldFilters)) {
992
- return false;
993
- }
994
- if (filters.missingMetadataActive && !itemMatchesMissingMetadata(item, filters.missingMetadataFilters, lifecycleClassifier)) {
995
- return false;
996
- }
997
- if (filters.contentFiltersActive && !itemMatchesContentFilters(item, filters.contentFieldFilters)) {
998
- return false;
999
- }
1000
- return true;
1001
- }
1002
- function applyFilters(items, options, typeRegistry, runtimeFieldFilters, statusFilter, lifecycleClassifier) {
1003
- const filters = resolveSearchMetadataFilterSet(options, typeRegistry, statusFilter);
1004
- return items.filter((document) => matchesSearchMetadataFilters(document, filters, runtimeFieldFilters, lifecycleClassifier));
1005
- }
1006
- function countOccurrences(haystack, needle) {
1007
- let count = 0;
1008
- let index = 0;
1009
- while (true) {
1010
- const foundAt = haystack.indexOf(needle, index);
1011
- if (foundAt < 0) {
1012
- return count;
1013
- }
1014
- count += 1;
1015
- index = foundAt + needle.length;
1016
- }
1017
- }
1018
- function tokenizeForExactTokenMatch(value) {
1019
- return tokenizeAlphaNumeric(value);
1020
- }
1021
- function collectLinkedPaths(item) {
1022
- const fromFiles = (item.files ?? []).map((entry) => ({
1023
- scope: entry.scope,
1024
- path: entry.path.trim()
1025
- }));
1026
- const fromDocs = (item.docs ?? []).map((entry) => ({
1027
- scope: entry.scope,
1028
- path: entry.path.trim()
1029
- }));
1030
- const fromTests = (item.tests ?? []).filter((entry) => typeof entry.path === "string" && entry.path.trim().length > 0).map((entry) => ({
1031
- scope: entry.scope,
1032
- path: entry.path.trim()
1033
- }));
1034
- const sorted = [...fromFiles, ...fromDocs, ...fromTests].filter((entry) => entry.path.length > 0).sort((a, b) => a.scope.localeCompare(b.scope) || a.path.localeCompare(b.path));
1035
- const deduped = /* @__PURE__ */ new Map();
1036
- for (const entry of sorted) {
1037
- deduped.set(`${entry.scope}:${entry.path}`, entry);
1038
- }
1039
- return [...deduped.values()];
1040
- }
1041
- async function resolveContainmentRoot(root) {
1042
- const resolved = path.resolve(root);
1043
- try {
1044
- const realpathRoot = await fs.realpath(resolved);
1045
- return {
1046
- resolved,
1047
- realpath: realpathRoot
1048
- };
1049
- } catch {
1050
- return null;
1051
- }
1052
- }
1053
- async function resolveLinkedCorpusRoots(projectRoot, globalRoot) {
1054
- const [projectContainmentRoot, globalContainmentRoot] = await Promise.all([
1055
- resolveContainmentRoot(projectRoot),
1056
- resolveContainmentRoot(globalRoot)
1057
- ]);
1058
- return {
1059
- projectContainmentRoot,
1060
- globalContainmentRoot
1061
- };
1062
- }
1063
- async function loadLinkedCorpus(document, roots) {
1064
- const linkedPaths = collectLinkedPaths(document.metadata);
1065
- const chunks = [];
1066
- for (const linkedPath of linkedPaths) {
1067
- const containmentRoot = linkedPath.scope === "global" ? roots.globalContainmentRoot : roots.projectContainmentRoot;
1068
- if (!containmentRoot) {
1069
- continue;
1070
- }
1071
- const resolved = path.resolve(containmentRoot.resolved, linkedPath.path);
1072
- if (!isPathWithinDirectory(containmentRoot.resolved, resolved)) {
1073
- continue;
1074
- }
1075
- let linkedRealpath;
1076
- try {
1077
- linkedRealpath = await fs.realpath(resolved);
1078
- } catch {
1079
- continue;
1080
- }
1081
- if (!isPathWithinDirectory(containmentRoot.realpath, linkedRealpath)) {
1082
- continue;
1083
- }
1084
- try {
1085
- await runActiveOnReadHooks({
1086
- path: resolved,
1087
- scope: linkedPath.scope
1088
- });
1089
- chunks.push(await fs.readFile(resolved, "utf8"));
1090
- } catch {
1091
- }
1092
- }
1093
- return chunks.join("\n");
1094
- }
1095
- var SEARCHABLE_FIELD_BUILDERS = [
1096
- { name: "title", weightKey: "title_weight", value: (document) => document.metadata.title },
1097
- { name: "description", weightKey: "description_weight", value: (document) => document.metadata.description },
1098
- { name: "tags", weightKey: "tags_weight", value: (document) => stringArray(document.metadata.tags).join(" ") },
1099
- {
1100
- name: "status",
1101
- weightKey: "status_weight",
1102
- value: (document) => typeof document.metadata.status === "string" ? document.metadata.status : ""
1103
- },
1104
- { name: "body", weightKey: "body_weight", value: (document) => document.body },
1105
- {
1106
- name: "comments",
1107
- weightKey: "comments_weight",
1108
- value: (document) => textEntries(document.metadata.comments).map((entry) => entry.text).join(" ")
1109
- },
1110
- {
1111
- name: "notes",
1112
- weightKey: "notes_weight",
1113
- value: (document) => textEntries(document.metadata.notes).map((entry) => entry.text).join(" ")
1114
- },
1115
- {
1116
- name: "learnings",
1117
- weightKey: "learnings_weight",
1118
- value: (document) => textEntries(document.metadata.learnings).map((entry) => entry.text).join(" ")
1119
- },
1120
- { name: "reminders", weightKey: "reminders_weight", value: (document) => buildReminderCorpus(document.metadata).join(" ") },
1121
- { name: "events", weightKey: "events_weight", value: (document) => buildEventCorpus(document.metadata).join(" ") },
1122
- {
1123
- name: "dependencies",
1124
- weightKey: "dependencies_weight",
1125
- value: (document) => dependencyEntries(document.metadata.dependencies).map((entry) => `${entry.id} ${entry.kind}`).join(" ")
1126
- },
1127
- { name: "plan", weightKey: "body_weight", value: (document) => buildPlanFlatCorpus(document.metadata) }
1128
- ];
1129
- var SEARCHABLE_FIELD_BUILDER_BY_NAME = new Map(SEARCHABLE_FIELD_BUILDERS.map((builder) => [builder.name, builder]));
1130
- function escapeRegExpLiteral(value) {
1131
- return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1132
- }
1133
- function markTokenRuns(text, tokens) {
1134
- const escaped = tokens.filter((token) => token.length > 0).sort((left, right) => right.length - left.length).map(escapeRegExpLiteral);
1135
- if (escaped.length === 0) {
1136
- return text;
1137
- }
1138
- const pattern = new RegExp(escaped.join("|"), "gi");
1139
- return text.replace(pattern, (match) => `${HIGHLIGHT_OPEN}${match}${HIGHLIGHT_CLOSE}`);
1140
- }
1141
- function highlightFieldSnippet(text, tokens) {
1142
- if (text.length === 0) {
1143
- return null;
1144
- }
1145
- const lowerText = text.toLowerCase();
1146
- let firstMatchIndex = -1;
1147
- for (const token of tokens) {
1148
- if (token.length === 0) {
1149
- continue;
1150
- }
1151
- const index = lowerText.indexOf(token);
1152
- if (index >= 0 && (firstMatchIndex < 0 || index < firstMatchIndex)) {
1153
- firstMatchIndex = index;
1154
- }
1155
- }
1156
- if (firstMatchIndex < 0) {
1157
- return null;
1158
- }
1159
- const windowStart = Math.max(0, firstMatchIndex - HIGHLIGHT_SNIPPET_RADIUS);
1160
- const windowEnd = Math.min(text.length, firstMatchIndex + HIGHLIGHT_SNIPPET_RADIUS);
1161
- const marked = markTokenRuns(text.slice(windowStart, windowEnd), tokens);
1162
- const prefix = windowStart > 0 ? "\u2026" : "";
1163
- const suffix = windowEnd < text.length ? "\u2026" : "";
1164
- return `${prefix}${marked}${suffix}`;
1165
- }
1166
- function buildHitHighlights(document, matchedFields, tokens) {
1167
- const highlights = [];
1168
- for (const field of matchedFields) {
1169
- const builder = SEARCHABLE_FIELD_BUILDER_BY_NAME.get(field);
1170
- if (builder === void 0) {
1171
- continue;
1172
- }
1173
- const snippet = highlightFieldSnippet(builder.value(document), tokens);
1174
- if (snippet !== null) {
1175
- highlights.push({ field, snippet });
1176
- }
1177
- }
1178
- return highlights;
1179
- }
1180
- function buildSearchableScoringFields(document, linkedCorpus, tuning) {
1181
- return [
1182
- ...SEARCHABLE_FIELD_BUILDERS.map((builder) => ({
1183
- name: builder.name,
1184
- value: builder.value(document),
1185
- weight: tuning[builder.weightKey]
1186
- })),
1187
- { name: "linked_content", value: linkedCorpus, weight: tuning.linked_content_weight }
1188
- ];
1189
- }
1190
- function buildExactIdSearchHit(item, normalizedQuery, idPrefix) {
1191
- const normalizedId = normalizeSearchPhrase(item.id);
1192
- const normalizedIdPrefix = typeof idPrefix === "string" ? idPrefix.trim().toLowerCase() : "";
1193
- const normalizedIdPrefixPhrase = normalizeSearchPhrase(normalizedIdPrefix);
1194
- const normalizedShortId = normalizedIdPrefixPhrase.length > 0 && normalizedId.startsWith(normalizedIdPrefixPhrase) ? normalizedId.slice(normalizedIdPrefixPhrase.length).trim() : normalizedId;
1195
- if (normalizedQuery !== normalizedId && normalizedQuery !== normalizedShortId) {
1196
- return null;
1197
- }
1198
- return {
1199
- item,
1200
- score: normalizedQuery === normalizedId ? EXACT_ID_MATCH_SCORE : SHORT_ID_MATCH_SCORE,
1201
- matched_fields: ["id"],
1202
- matched_all_terms: true,
1203
- exact_id_match: true
1204
- };
1205
- }
1206
- function scoreTokenMatches(tokens, titleTokenCounts, searchableFields, tuning, state) {
1207
- for (const token of tokens) {
1208
- const exactTitleMatches = titleTokenCounts.get(token) ?? 0;
1209
- if (exactTitleMatches > 0) {
1210
- state.score += exactTitleMatches * tuning.title_exact_bonus;
1211
- state.matched.add("title");
1212
- state.matchedTokens.add(token);
1213
- }
1214
- for (const field of searchableFields) {
1215
- const occurrences = countOccurrences(field.value.toLowerCase(), token);
1216
- if (occurrences > 0) {
1217
- state.score += occurrences * field.weight;
1218
- state.matched.add(field.name);
1219
- state.matchedTokens.add(token);
1220
- }
1221
- }
1222
- }
1223
- }
1224
- function scorePhraseMatches(item, normalizedQuery, searchableFields, state) {
1225
- const normalizedTitle = normalizeSearchPhrase(item.title);
1226
- if (normalizedTitle === normalizedQuery) {
1227
- state.score += LONG_QUERY_TITLE_EXACT_BONUS;
1228
- state.matched.add("title");
1229
- }
1230
- for (const field of searchableFields) {
1231
- const phraseOccurrences = countOccurrences(normalizeSearchPhrase(field.value), normalizedQuery);
1232
- if (phraseOccurrences > 0) {
1233
- state.score += phraseOccurrences * field.weight * LONG_QUERY_PHRASE_MULTIPLIER;
1234
- state.matched.add(field.name);
1235
- }
1236
- }
1237
- }
1238
- function scoreDocument(document, tokens, normalizedQuery, linkedCorpus, tuning, idPrefix, applyCoverageBonus = false) {
1239
- const item = document.metadata;
1240
- const exactIdHit = buildExactIdSearchHit(item, normalizedQuery, idPrefix);
1241
- if (exactIdHit) {
1242
- return exactIdHit;
1243
- }
1244
- const titleTokenCounts = /* @__PURE__ */ new Map();
1245
- for (const token of tokenizeForExactTokenMatch(item.title)) {
1246
- titleTokenCounts.set(token, (titleTokenCounts.get(token) ?? 0) + 1);
1247
- }
1248
- const searchableFields = buildSearchableScoringFields(document, linkedCorpus, tuning);
1249
- const state = { score: 0, matched: /* @__PURE__ */ new Set(), matchedTokens: /* @__PURE__ */ new Set() };
1250
- scoreTokenMatches(tokens, titleTokenCounts, searchableFields, tuning, state);
1251
- const distinctTokens = new Set(tokens);
1252
- const matchedAllTerms = distinctTokens.size > 0 && state.matchedTokens.size === distinctTokens.size;
1253
- if (applyCoverageBonus && distinctTokens.size > 1 && matchedAllTerms) {
1254
- state.score += ALL_TERMS_COVERAGE_BONUS;
1255
- }
1256
- const isLongPhraseQuery = tokens.length >= LONG_QUERY_TOKEN_THRESHOLD && normalizedQuery.includes(" ");
1257
- if (isLongPhraseQuery) {
1258
- scorePhraseMatches(item, normalizedQuery, searchableFields, state);
1259
- }
1260
- if (state.score <= 0) {
1261
- return null;
1262
- }
1263
- return {
1264
- item,
1265
- score: state.score,
1266
- matched_fields: [...state.matched].sort((a, b) => a.localeCompare(b)),
1267
- matched_all_terms: matchedAllTerms
1268
- };
1269
- }
1270
- function sortHits(items, statusRegistry) {
1271
- return [...items].sort((a, b) => {
1272
- const byScore = b.score - a.score;
1273
- if (byScore !== 0)
1274
- return byScore;
1275
- const aTerminal = isTerminalStatus(a.item.status, statusRegistry);
1276
- const bTerminal = isTerminalStatus(b.item.status, statusRegistry);
1277
- if (aTerminal !== bTerminal) {
1278
- return aTerminal ? 1 : -1;
1279
- }
1280
- const byPriority = a.item.priority - b.item.priority;
1281
- if (byPriority !== 0)
1282
- return byPriority;
1283
- const byUpdated = compareTimestampStrings(b.item.updated_at, a.item.updated_at);
1284
- if (byUpdated !== 0)
1285
- return byUpdated;
1286
- return a.item.id.localeCompare(b.item.id);
1287
- });
1288
- }
1289
- function buildHybridLexicalScore(document, tokens, normalizedQuery, includeLinked, linkedCorpusById, tuning, idPrefix, applyCoverageBonus = false) {
1290
- return scoreDocument(document, tokens, normalizedQuery, includeLinked ? linkedCorpusById.get(document.metadata.id) ?? "" : "", tuning, idPrefix, applyCoverageBonus);
1291
- }
1292
- function normalizeScoreMap(scoreById) {
1293
- if (scoreById.size === 0) {
1294
- return /* @__PURE__ */ new Map();
1295
- }
1296
- const values = [...scoreById.values()];
1297
- const minScore = Math.min(...values);
1298
- const maxScore = Math.max(...values);
1299
- if (maxScore === minScore) {
1300
- return new Map([...scoreById.keys()].map((id) => [id, 1]));
1301
- }
1302
- const normalized = /* @__PURE__ */ new Map();
1303
- for (const [id, score] of scoreById) {
1304
- normalized.set(id, (score - minScore) / (maxScore - minScore));
1305
- }
1306
- return normalized;
1307
- }
1308
- function resolveSearchMaxResults(settings) {
1309
- const candidate = settings.search?.max_results;
1310
- if (typeof candidate === "number" && Number.isFinite(candidate) && candidate > 0) {
1311
- return Math.floor(candidate);
1312
- }
1313
- return 50;
1314
- }
1315
- function resolveSearchScoreThreshold(settings) {
1316
- const candidate = settings.search?.score_threshold;
1317
- if (typeof candidate === "number" && Number.isFinite(candidate)) {
1318
- return candidate;
1319
- }
1320
- return 0;
1321
- }
1322
- function resolveHybridSemanticWeight(settings) {
1323
- const candidate = settings.search?.hybrid_semantic_weight;
1324
- if (typeof candidate === "number" && Number.isFinite(candidate) && candidate >= 0 && candidate <= 1) {
1325
- return candidate;
1326
- }
1327
- return 0.7;
1328
- }
1329
- function resolveSearchTuning(settings) {
1330
- const defaults = {
1331
- title_exact_bonus: 10,
1332
- title_weight: 8,
1333
- description_weight: 5,
1334
- tags_weight: 6,
1335
- status_weight: 2,
1336
- body_weight: 1,
1337
- comments_weight: 1,
1338
- notes_weight: 1,
1339
- learnings_weight: 1,
1340
- reminders_weight: 2,
1341
- events_weight: 2,
1342
- dependencies_weight: 3,
1343
- linked_content_weight: 1
1344
- };
1345
- const tuning = settings.search?.tuning;
1346
- if (!tuning)
1347
- return defaults;
1348
- const resolveWeight = (candidate, fallback) => {
1349
- if (typeof candidate === "number" && Number.isFinite(candidate) && candidate >= 0) {
1350
- return candidate;
1351
- }
1352
- return fallback;
1353
- };
1354
- return {
1355
- title_exact_bonus: resolveWeight(tuning.title_exact_bonus, defaults.title_exact_bonus),
1356
- title_weight: resolveWeight(tuning.title_weight, defaults.title_weight),
1357
- description_weight: resolveWeight(tuning.description_weight, defaults.description_weight),
1358
- tags_weight: resolveWeight(tuning.tags_weight, defaults.tags_weight),
1359
- status_weight: resolveWeight(tuning.status_weight, defaults.status_weight),
1360
- body_weight: resolveWeight(tuning.body_weight, defaults.body_weight),
1361
- comments_weight: resolveWeight(tuning.comments_weight, defaults.comments_weight),
1362
- notes_weight: resolveWeight(tuning.notes_weight, defaults.notes_weight),
1363
- learnings_weight: resolveWeight(tuning.learnings_weight, defaults.learnings_weight),
1364
- reminders_weight: resolveWeight(tuning.reminders_weight, defaults.reminders_weight),
1365
- events_weight: resolveWeight(tuning.events_weight, defaults.events_weight),
1366
- dependencies_weight: resolveWeight(tuning.dependencies_weight, defaults.dependencies_weight),
1367
- linked_content_weight: resolveWeight(tuning.linked_content_weight, defaults.linked_content_weight)
1368
- };
1369
- }
1370
- function emptySearchResult(query, mode, matchMode, options, includeLinked, scoreThreshold, hybridSemanticWeight, queryExpansion, rerank, projection, warnings, runtimeFieldFilters, countOnly = false) {
1371
- const countExtras = countOnly ? { total: 0, count_only: true } : {};
1372
- const compactSummaryMode = projection.mode === "compact" && options.compact === true;
1373
- if (compactSummaryMode) {
1374
- const compactFilters = buildCompactSearchFilterSummary({
1375
- mode,
1376
- matchMode,
1377
- options,
1378
- includeLinked,
1379
- titleExact: options.titleExact === true,
1380
- phraseExact: options.phraseExact === true,
1381
- scoreThreshold,
1382
- hybridSemanticWeight,
1383
- runtimeFieldFilters
1384
- });
1385
- return {
1386
- query: query.trim(),
1387
- mode,
1388
- items: [],
1389
- count: 0,
1390
- ...countExtras,
1391
- filters: compactFilters,
1392
- ...warnings.length > 0 ? { warnings } : {}
1393
- };
1394
- }
1395
- const projectionFields = projection.mode === "full" ? null : [...projection.fields];
1396
- return {
1397
- query: query.trim(),
1398
- mode,
1399
- items: [],
1400
- count: 0,
1401
- ...countExtras,
1402
- filters: buildVerboseSearchFilters({
1403
- effectiveMode: mode,
1404
- matchMode,
1405
- options,
1406
- includeLinked,
1407
- titleExact: options.titleExact === true,
1408
- phraseExact: options.phraseExact === true,
1409
- scoreThreshold,
1410
- hybridSemanticWeight,
1411
- queryExpansion,
1412
- rerank,
1413
- runtimeFieldFilters: runtimeFieldFilters ?? {}
1414
- }),
1415
- projection: {
1416
- mode: projection.mode,
1417
- fields: projectionFields
1418
- },
1419
- now: nowIso(),
1420
- ...warnings.length > 0 ? { warnings } : {}
1421
- };
1422
- }
1423
- function requireSemanticDependencies(requestedMode, providerResolution, vectorResolution, hasExtensionVectorQuery) {
1424
- if (!providerResolution.active) {
1425
- throw new PmCliError(`Search mode '${requestedMode}' requires a configured embedding provider in settings.providers.openai or settings.providers.ollama`, EXIT_CODE.USAGE);
1426
- }
1427
- if (!vectorResolution.active && !hasExtensionVectorQuery) {
1428
- throw new PmCliError(`Search mode '${requestedMode}' requires a configured vector store in settings.vector_store.qdrant/settings.vector_store.lancedb or an extension adapter selected by settings.vector_store.adapter`, EXIT_CODE.USAGE);
1429
- }
1430
- return {
1431
- provider: providerResolution.active,
1432
- vectorStore: vectorResolution.active ?? null
1433
- };
1434
- }
1435
- var toOptionalNonEmptyString = toNonEmptyStringOrUndefined;
1436
- function resolveExtensionSearchProviderByName(providerName) {
1437
- const registrations = getActiveExtensionRegistrations();
1438
- const resolved = resolveRegisteredSearchProvider(registrations, providerName);
1439
- if (!resolved) {
1440
- return null;
1441
- }
1442
- const runtimeDefinition = resolved.runtime_definition ?? resolved.definition;
1443
- const query = runtimeDefinition.query;
1444
- const queryExpansion = runtimeDefinition.queryExpansion ?? runtimeDefinition.query_expansion;
1445
- const rerank = runtimeDefinition.rerank;
1446
- const registeredName = toOptionalNonEmptyString(runtimeDefinition.name) ?? toOptionalNonEmptyString(resolved.definition.name) ?? providerName;
1447
- if (!registeredName) {
1448
- return null;
1449
- }
1450
- const hooks = {
1451
- providerName: registeredName,
1452
- ...typeof query === "function" ? { query } : {},
1453
- ...typeof queryExpansion === "function" ? { queryExpansion } : {},
1454
- ...typeof rerank === "function" ? { rerank } : {}
1455
- };
1456
- if (!hooks.query && !hooks.queryExpansion && !hooks.rerank) {
1457
- return null;
1458
- }
1459
- return hooks;
1460
- }
1461
- function resolveExtensionSearchProvider(settings) {
1462
- const providerName = toOptionalNonEmptyString(settings.search?.provider);
1463
- const resolved = resolveExtensionSearchProviderByName(providerName);
1464
- if (!resolved?.query) {
1465
- return null;
1466
- }
1467
- return {
1468
- providerName: resolved.providerName,
1469
- query: resolved.query
1470
- };
1471
- }
1472
- function resolveExtensionVectorAdapter(settings) {
1473
- const registrations = getActiveExtensionRegistrations();
1474
- const adapterName = toOptionalNonEmptyString(settings.vector_store?.adapter);
1475
- const resolved = resolveRegisteredVectorStoreAdapter(registrations, adapterName);
1476
- if (!resolved) {
1477
- return null;
1478
- }
1479
- const runtimeDefinition = resolved.runtime_definition ?? resolved.definition;
1480
- const query = runtimeDefinition.query;
1481
- if (typeof query !== "function") {
1482
- return null;
1483
- }
1484
- const upsert = runtimeDefinition.upsert;
1485
- const runtimeAdapterName = toOptionalNonEmptyString(runtimeDefinition.name) ?? toOptionalNonEmptyString(resolved.definition.name) ?? adapterName ?? "extension";
1486
- return {
1487
- adapterName: runtimeAdapterName,
1488
- query,
1489
- ...typeof upsert === "function" ? { upsert } : {}
1490
- };
1491
- }
1492
- function normalizeExtensionProviderHits(providerName, raw, filteredById) {
1493
- const rawHits = Array.isArray(raw) ? raw : raw?.hits;
1494
- if (!Array.isArray(rawHits)) {
1495
- throw new PmCliError(`Extension search provider "${providerName}" must return an array of hits or { hits: [...] }`, EXIT_CODE.GENERIC_FAILURE);
1496
- }
1497
- const seen = /* @__PURE__ */ new Set();
1498
- const hits = [];
1499
- for (const rawHit of rawHits) {
1500
- if (typeof rawHit !== "object" || rawHit === null) {
1501
- continue;
1502
- }
1503
- const id = toOptionalNonEmptyString(rawHit.id);
1504
- const score = rawHit.score;
1505
- if (!id || typeof score !== "number" || !Number.isFinite(score) || seen.has(id)) {
1506
- continue;
1507
- }
1508
- const document = filteredById.get(id);
1509
- if (!document) {
1510
- continue;
1511
- }
1512
- const matchedFieldsRaw = rawHit.matched_fields;
1513
- const matchedFields = Array.isArray(matchedFieldsRaw) && matchedFieldsRaw.every((entry) => typeof entry === "string") ? [...new Set(matchedFieldsRaw.map((entry) => entry.trim()).filter((entry) => entry.length > 0))].sort((a, b) => a.localeCompare(b)) : [`provider:${providerName}`];
1514
- seen.add(id);
1515
- hits.push({
1516
- item: document.metadata,
1517
- score,
1518
- matched_fields: matchedFields
1519
- });
1520
- }
1521
- return hits;
1522
- }
1523
- function buildSemanticHits(vectorHits, filteredById) {
1524
- const semanticHits = [];
1525
- const semanticScores = /* @__PURE__ */ new Map();
1526
- for (const vectorHit of vectorHits) {
1527
- if (semanticScores.has(vectorHit.id)) {
1528
- continue;
1529
- }
1530
- const document = filteredById.get(vectorHit.id);
1531
- if (!document) {
1532
- continue;
1533
- }
1534
- semanticScores.set(vectorHit.id, vectorHit.score);
1535
- semanticHits.push({
1536
- item: document.metadata,
1537
- score: vectorHit.score,
1538
- matched_fields: ["semantic"]
1539
- });
1540
- }
1541
- return {
1542
- semanticHits,
1543
- semanticScores
1544
- };
1545
- }
1546
- function forceExactIdHitsToTop(rankedHits, keywordHits) {
1547
- const exactIdHits = keywordHits.filter((hit) => hit.exact_id_match === true);
1548
- if (exactIdHits.length === 0) {
1549
- return rankedHits;
1550
- }
1551
- const exactIdIds = new Set(exactIdHits.map((hit) => hit.item.id));
1552
- const remaining = rankedHits.filter((hit) => !exactIdIds.has(hit.item.id));
1553
- const maxRemainingScore = remaining.reduce((max, hit) => Math.max(max, hit.score), 0);
1554
- const orderedExactHits = exactIdHits.sort((left, right) => right.score - left.score);
1555
- const bandBase = maxRemainingScore + orderedExactHits.length + 1;
1556
- const promoted = orderedExactHits.map((hit, index) => ({
1557
- // Spread the original keyword hit so flags like matched_all_terms /
1558
- // exact_id_match are preserved; only the band-slot score and the id-only
1559
- // matched_fields are overridden.
1560
- ...hit,
1561
- // Higher band slot for earlier (higher original keyword score) hits.
1562
- score: bandBase - index,
1563
- matched_fields: ["id"]
1564
- }));
1565
- return [...promoted, ...remaining];
1566
- }
1567
- function combineHybridHits(filteredById, semanticScores, keywordHits, hybridSemanticWeight, semanticFieldLabel = "semantic") {
1568
- const keywordScores = new Map(keywordHits.map((entry) => [entry.item.id, entry.score]));
1569
- const keywordMatches = new Map(keywordHits.map((entry) => [entry.item.id, entry.matched_fields]));
1570
- const normalizedSemantic = normalizeScoreMap(semanticScores);
1571
- const normalizedKeyword = normalizeScoreMap(keywordScores);
1572
- const candidateIds = /* @__PURE__ */ new Set([...semanticScores.keys(), ...keywordScores.keys()]);
1573
- const keywordWeight = 1 - hybridSemanticWeight;
1574
- return [...candidateIds].map((id) => {
1575
- const document = filteredById.get(id);
1576
- const semanticScore = normalizedSemantic.get(id) ?? 0;
1577
- const keywordScore = normalizedKeyword.get(id) ?? 0;
1578
- const combinedScore = semanticScore * hybridSemanticWeight + keywordScore * keywordWeight;
1579
- if (combinedScore <= 0) {
1580
- return null;
1581
- }
1582
- const matchedFields = /* @__PURE__ */ new Set();
1583
- if (semanticScores.has(id)) {
1584
- matchedFields.add(semanticFieldLabel);
1585
- }
1586
- for (const field of keywordMatches.get(id) ?? []) {
1587
- matchedFields.add(field);
1588
- }
1589
- return {
1590
- item: document.metadata,
1591
- score: combinedScore,
1592
- matched_fields: [...matchedFields].sort((a, b) => a.localeCompare(b))
1593
- };
1594
- }).filter((entry) => entry !== null);
1595
- }
1596
- function resolveBuiltInBm25Mode(params) {
1597
- const normalized = params.configuredProvider?.trim().toLowerCase();
1598
- if (normalized === "bm25") {
1599
- return "explicit";
1600
- }
1601
- if (normalized === "auto" && !params.hasEmbeddingProvider && !params.hasExtensionSearchProvider) {
1602
- return "auto-fallback";
1603
- }
1604
- return null;
1605
- }
1606
- function computeBuiltInBm25Hits(params) {
1607
- const bm25Documents = params.filteredDocuments.map((document) => ({
1608
- id: document.metadata.id,
1609
- text: flattenSearchCorpusText(buildSearchCorpus(document, { fields: params.corpusFields }))
1610
- }));
1611
- const index = buildBm25Index(bm25Documents);
1612
- const bm25Scores = scoreBm25Query(index, tokenizeBm25(params.query), params.bm25Params);
1613
- const filteredById = new Map(params.filteredDocuments.map((document) => [document.metadata.id, document]));
1614
- if (params.requestedMode === "semantic") {
1615
- const semanticHits = [...bm25Scores].map(([id, score]) => ({
1616
- item: filteredById.get(id).metadata,
1617
- score,
1618
- matched_fields: ["bm25"]
1619
- }));
1620
- return forceExactIdHitsToTop(semanticHits, params.keywordHits);
1621
- }
1622
- const hybridHits = combineHybridHits(filteredById, bm25Scores, params.keywordHits, params.hybridSemanticWeight, "bm25");
1623
- return forceExactIdHitsToTop(hybridHits, params.keywordHits);
1624
- }
1625
- function mergeVectorHitsById(vectorHitGroups) {
1626
- const bestById = /* @__PURE__ */ new Map();
1627
- for (const group of vectorHitGroups) {
1628
- for (const hit of group) {
1629
- const existing = bestById.get(hit.id);
1630
- if (!existing || hit.score > existing.score) {
1631
- bestById.set(hit.id, hit);
1632
- }
1633
- }
1634
- }
1635
- const merged = [...bestById.values()];
1636
- merged.sort((left, right) => {
1637
- if (left.score !== right.score) {
1638
- return right.score - left.score;
1639
- }
1640
- return left.id.localeCompare(right.id);
1641
- });
1642
- return merged;
1643
- }
1644
- function buildRerankCorpus(document) {
1645
- const metadata = document.metadata;
1646
- const tags = Array.isArray(metadata?.tags) ? metadata.tags.join(" ") : "";
1647
- return [
1648
- metadata?.title,
1649
- metadata?.description,
1650
- metadata?.type,
1651
- metadata?.status,
1652
- tags,
1653
- document.body
1654
- ].map((entry) => typeof entry === "string" ? entry.trim() : "").filter((entry) => entry.length > 0).join("\n");
1655
- }
1656
- async function resolveExpandedSemanticQueries(context, queryTrimmed) {
1657
- const baseExpandedQueries = context.queryExpansion.enabled ? buildDeterministicQueryExpansions(queryTrimmed, context.queryExpansion.max_queries) : [queryTrimmed];
1658
- const expandedQueries = baseExpandedQueries.length > 0 ? baseExpandedQueries : [queryTrimmed];
1659
- if (!context.queryExpansion.enabled) {
1660
- return expandedQueries;
1661
- }
1662
- if (context.queryExpansionExtension?.expand) {
1663
- try {
1664
- const rawExpansion = await Promise.resolve(context.queryExpansionExtension.expand({
1665
- query: queryTrimmed,
1666
- mode: context.requestedMode,
1667
- settings: context.settings
1668
- }));
1669
- return mergeQueryExpansions(expandedQueries, normalizeQueryExpansionOutput(rawExpansion), context.queryExpansion.max_queries);
1670
- } catch {
1671
- context.warnings.push(`search_query_expansion_provider_failed:${context.queryExpansionExtension.providerName}:using_builtin`);
1672
- return expandedQueries;
1673
- }
1674
- }
1675
- if (context.queryExpansion.provider && context.queryExpansion.provider !== "openai" && context.queryExpansion.provider !== "ollama") {
1676
- context.warnings.push(`search_query_expansion_provider_unavailable:${context.queryExpansion.provider}:using_builtin`);
1677
- }
1678
- return expandedQueries;
1679
- }
1680
- async function executeSemanticVectorQuery(context, semanticVector, semanticLimit, vectorQueryOptions) {
1681
- if (context.extensionVectorAdapter?.query) {
1682
- try {
1683
- return await Promise.resolve(context.extensionVectorAdapter.query({
1684
- vector: semanticVector,
1685
- limit: semanticLimit,
1686
- settings: context.settings
1687
- }));
1688
- } catch (error) {
1689
- if (!context.vectorStore) {
1690
- throw new PmCliError(`Extension vector adapter query failed and no built-in fallback store is configured (${error instanceof Error ? error.message : String(error)})`, EXIT_CODE.GENERIC_FAILURE);
1691
- }
1692
- context.warnings.push(`search_vector_adapter_failed:${context.extensionVectorAdapter.adapterName}:using_builtin`);
1693
- return await executeVectorQuery(context.vectorStore, semanticVector, semanticLimit, vectorQueryOptions);
1694
- }
1695
- }
1696
- if (context.vectorStore) {
1697
- return await executeVectorQuery(context.vectorStore, semanticVector, semanticLimit, vectorQueryOptions);
1698
- }
1699
- throw new PmCliError("Semantic search requires either a configured vector store or an extension vector adapter query handler", EXIT_CODE.USAGE);
1700
- }
1701
- function buildRerankCandidateContexts(hybridHits, filteredById, topK) {
1702
- const sortedForCandidates = [...hybridHits].sort((left, right) => {
1703
- if (left.score !== right.score) {
1704
- return right.score - left.score;
1705
- }
1706
- return left.item.id.localeCompare(right.item.id);
1707
- });
1708
- return sortedForCandidates.slice(0, topK).map((hit) => {
1709
- const document = filteredById.get(hit.item.id);
1710
- return document ? { hit, text: buildRerankCorpus(document) } : null;
1711
- }).filter((entry) => entry !== null);
1712
- }
1713
- async function resolveExtensionRerankScores(context, queryTrimmed, candidateContexts) {
1714
- if (!context.rerankExtension?.rerank) {
1715
- return null;
1716
- }
1717
- try {
1718
- const rawRerank = await Promise.resolve(context.rerankExtension.rerank({
1719
- query: queryTrimmed,
1720
- mode: "hybrid",
1721
- model: context.rerank.model,
1722
- top_k: context.rerank.top_k,
1723
- settings: context.settings,
1724
- candidates: candidateContexts.map((entry) => ({
1725
- id: entry.hit.item.id,
1726
- text: entry.text,
1727
- score: entry.hit.score
1728
- }))
1729
- }));
1730
- const normalizedRerank = normalizeRerankOutput(rawRerank);
1731
- if (normalizedRerank.length > 0) {
1732
- return new Map(normalizedRerank.map((entry) => [entry.id, entry.score]));
1733
- }
1734
- context.warnings.push(`search_rerank_provider_invalid_response:${context.rerankExtension.providerName}:using_builtin`);
1735
- return null;
1736
- } catch {
1737
- context.warnings.push(`search_rerank_provider_failed:${context.rerankExtension.providerName}:using_builtin`);
1738
- return null;
1739
- }
1740
- }
1741
- async function resolveRerankScores(context, queryTrimmed, candidateContexts) {
1742
- const extensionScores = await resolveExtensionRerankScores(context, queryTrimmed, candidateContexts);
1743
- if (extensionScores) {
1744
- return extensionScores;
1745
- }
1746
- const rerankCandidates = candidateContexts.map((entry) => ({
1747
- id: entry.hit.item.id,
1748
- text: entry.text
1749
- }));
1750
- try {
1751
- return await rerankCandidatesWithEmbeddings(context.provider, context.rerank.model, queryTrimmed, rerankCandidates, context.embeddingTimeoutMs);
1752
- } catch {
1753
- context.warnings.push("search_rerank_failed:using_hybrid_scores");
1754
- return null;
1755
- }
1756
- }
1757
- function applyRerankScores(hybridHits, rerankScores) {
1758
- const rerankedIds = new Set(rerankScores.keys());
1759
- const rerankedHits = hybridHits.map((hit) => {
1760
- const rerankScore = rerankScores.get(hit.item.id);
1761
- if (rerankScore === void 0) {
1762
- return hit;
1763
- }
1764
- const matchedFields = new Set(hit.matched_fields);
1765
- matchedFields.add("rerank");
1766
- return {
1767
- ...hit,
1768
- score: rerankScore,
1769
- matched_fields: [...matchedFields].sort((left, right) => left.localeCompare(right))
1770
- };
1771
- });
1772
- rerankedHits.sort((left, right) => {
1773
- const leftWasReranked = rerankedIds.has(left.item.id);
1774
- const rightWasReranked = rerankedIds.has(right.item.id);
1775
- if (leftWasReranked !== rightWasReranked) {
1776
- return leftWasReranked ? -1 : 1;
1777
- }
1778
- if (left.score !== right.score) {
1779
- return right.score - left.score;
1780
- }
1781
- return left.item.id.localeCompare(right.item.id);
1782
- });
1783
- return rerankedHits;
1784
- }
1785
- async function applyHybridRerank(context, queryTrimmed, hybridHits, filteredById) {
1786
- if (!context.rerank.enabled || hybridHits.length <= 1) {
1787
- return hybridHits;
1788
- }
1789
- const candidateContexts = buildRerankCandidateContexts(hybridHits, filteredById, context.rerank.top_k);
1790
- const rerankScores = await resolveRerankScores(context, queryTrimmed, candidateContexts);
1791
- return rerankScores && rerankScores.size > 0 ? applyRerankScores(hybridHits, rerankScores) : hybridHits;
1792
- }
1793
- async function computeSemanticOrHybridHits(context) {
1794
- const semanticLimit = context.limit ?? context.maxResults;
1795
- const embeddingOptions = context.embeddingTimeoutMs !== void 0 ? { timeout_ms: context.embeddingTimeoutMs } : {};
1796
- const vectorQueryOptions = context.vectorQueryTimeoutMs !== void 0 ? { timeout_ms: context.vectorQueryTimeoutMs } : {};
1797
- const queryTrimmed = context.query.trim();
1798
- const expandedQueries = await resolveExpandedSemanticQueries(context, queryTrimmed);
1799
- const queryVectors = await executeEmbeddingRequest(context.provider, expandedQueries, embeddingOptions);
1800
- const queryVectorGroups = await Promise.all(queryVectors.map(async (semanticVector) => await executeSemanticVectorQuery(context, semanticVector, semanticLimit, vectorQueryOptions)));
1801
- const vectorHits = mergeVectorHitsById(queryVectorGroups);
1802
- const filteredById = new Map(context.filteredDocuments.map((document) => [document.metadata.id, document]));
1803
- const { semanticHits, semanticScores } = buildSemanticHits(vectorHits, filteredById);
1804
- const vectorMatchCount = semanticScores.size;
1805
- if (context.requestedMode === "semantic") {
1806
- return { hits: forceExactIdHitsToTop(semanticHits, context.keywordHits), vectorMatchCount };
1807
- }
1808
- const hybridHits = await applyHybridRerank(context, queryTrimmed, combineHybridHits(filteredById, semanticScores, context.keywordHits, context.hybridSemanticWeight), filteredById);
1809
- return {
1810
- // GH-281: applied LAST (after any rerank reordering) so an exact full-ID /
1811
- // short-ID keyword match always ranks #1 in hybrid mode regardless of the
1812
- // semantic blend weight or rerank scores.
1813
- hits: forceExactIdHitsToTop(hybridHits, context.keywordHits),
1814
- vectorMatchCount
1815
- };
1816
- }
1817
- async function loadDocuments(pmRoot, itemFormat, typeToFolder, schema) {
1818
- const extensionFieldNames = collectRegisteredItemFieldNames(getActiveExtensionRegistrations());
1819
- const readDocumentBody = async (metadata, preferredPath, preferredFormat) => {
1820
- const tryRead = async (targetPath, format) => {
1821
- await runActiveOnReadHooks({ path: targetPath, scope: "project" });
1822
- const raw = await fs.readFile(targetPath, "utf8");
1823
- const parsed = parseItemDocument(raw, {
1824
- format,
1825
- schema,
1826
- extensionFieldNames,
1827
- onWarning: (warning) => listWarnings.push(warning)
1828
- });
1829
- return parsed.body;
1830
- };
1831
- try {
1832
- return await tryRead(preferredPath, preferredFormat);
1833
- } catch {
1834
- const alternateFormat = preferredFormat === "toon" ? "json_markdown" : "toon";
1835
- const alternatePath = getItemPath(pmRoot, metadata.type, metadata.id, alternateFormat, typeToFolder);
1836
- try {
1837
- return await tryRead(alternatePath, alternateFormat);
1838
- } catch {
1839
- listWarnings.push(`item_list_item_read_failed:${path.relative(pmRoot, alternatePath)}`);
1840
- return "";
1841
- }
1842
- }
1843
- };
1844
- const listWarnings = [];
1845
- const cachedDocuments = await listAllDocumentCandidatesCached(pmRoot, itemFormat, typeToFolder, listWarnings, schema);
1846
- const documents = [];
1847
- if (cachedDocuments.length === 0) {
1848
- const frontMatterDocuments = await listAllFrontMatter(pmRoot, itemFormat, typeToFolder, listWarnings, schema);
1849
- for (const metadata of frontMatterDocuments) {
1850
- const preferredPath = getItemPath(pmRoot, metadata.type, metadata.id, itemFormat, typeToFolder);
1851
- const body = await readDocumentBody(metadata, preferredPath, itemFormat);
1852
- documents.push({ metadata, body });
1853
- }
1854
- return {
1855
- documents,
1856
- warnings: [...new Set(listWarnings)].sort((left, right) => left.localeCompare(right))
1857
- };
1858
- }
1859
- for (const cachedDocument of cachedDocuments) {
1860
- if (typeof cachedDocument.body === "string") {
1861
- documents.push({
1862
- metadata: cachedDocument.metadata,
1863
- body: cachedDocument.body
1864
- });
1865
- continue;
1866
- }
1867
- const body = await readDocumentBody(cachedDocument.metadata, cachedDocument.item_path, cachedDocument.item_format);
1868
- documents.push({
1869
- metadata: cachedDocument.metadata,
1870
- body
1871
- });
1872
- }
1873
- return {
1874
- documents,
1875
- warnings: [...new Set(listWarnings)].sort((left, right) => left.localeCompare(right))
1876
- };
1877
- }
1878
- function readSearchFieldValue(hit, field) {
1879
- const normalized = field.trim();
1880
- if (normalized.length === 0) {
1881
- return null;
1882
- }
1883
- if (normalized === "score") {
1884
- return hit.score;
1885
- }
1886
- if (normalized === "matched_fields") {
1887
- return hit.matched_fields;
1888
- }
1889
- if (normalized.startsWith("item.")) {
1890
- const itemKey = normalized.slice("item.".length);
1891
- if (itemKey.length === 0) {
1892
- return null;
1893
- }
1894
- const itemRecord2 = toItemRecord(hit.item);
1895
- return itemRecord2[itemKey] ?? null;
1896
- }
1897
- const hitRecord = hit;
1898
- const itemRecord = toItemRecord(hit.item);
1899
- if (Object.prototype.hasOwnProperty.call(itemRecord, normalized)) {
1900
- return itemRecord[normalized] ?? null;
1901
- }
1902
- if (Object.prototype.hasOwnProperty.call(hitRecord, normalized)) {
1903
- return hitRecord[normalized] ?? null;
1904
- }
1905
- return null;
1906
- }
1907
- function projectSearchHits(hits, projection) {
1908
- if (projection.mode === "full") {
1909
- return hits.map(({ matched_all_terms: _matchedAllTerms, ...hit }) => hit);
1910
- }
1911
- return hits.map((hit) => {
1912
- const projected = {};
1913
- for (const field of projection.fields) {
1914
- projected[field] = readSearchFieldValue(hit, field);
1915
- }
1916
- return projected;
1917
- });
1918
- }
1919
- function resolveQueryExpansionExtension(queryExpansion) {
1920
- const provider = resolveExtensionSearchProviderByName(queryExpansion.provider ?? void 0);
1921
- return provider?.queryExpansion ? { providerName: provider.providerName, expand: provider.queryExpansion } : null;
1922
- }
1923
- function resolveRerankExtension(settings) {
1924
- const provider = resolveExtensionSearchProviderByName(toOptionalNonEmptyString(settings.search?.provider));
1925
- return provider?.rerank ? { providerName: provider.providerName, rerank: provider.rerank } : null;
1926
- }
1927
- function prepareSearchInput(rawQuery, rawOptions) {
1928
- const inlineWarnings = [];
1929
- const inlineParse = parseInlineQueryFilters(rawQuery);
1930
- const hasInlineFilters = Object.keys(inlineParse.inlineFilters).length > 0;
1931
- if (hasInlineFilters && inlineParse.residualQuery.trim().length === 0) {
1932
- throw new PmCliError("Inline field:value tokens consumed the entire query, leaving no search terms.", EXIT_CODE.USAGE, {
1933
- examples: ["pm search auth tag:area:search", "pm list --tag area:search --status open"],
1934
- nextSteps: [
1935
- "Add keyword terms alongside the inline filters, or use pm list for pure tag/status/type/priority filtering."
1936
- ]
1937
- });
1938
- }
1939
- const query = hasInlineFilters ? inlineParse.residualQuery : rawQuery;
1940
- const options = applyInlineQueryFilters(rawOptions, inlineParse.inlineFilters, inlineWarnings);
1941
- return {
1942
- query,
1943
- options,
1944
- inlineWarnings,
1945
- highlight: options.highlight === true,
1946
- includeLinked: parseIncludeLinked(options.includeLinked),
1947
- titleExact: parseTitleExact(options.titleExact),
1948
- phraseExact: parsePhraseExact(options.phraseExact),
1949
- matchMode: parseMatchMode(typeof options.matchMode === "string" ? options.matchMode : void 0),
1950
- minScoreOverride: parseMinScoreOverride(options.minScore),
1951
- countOnly: options.count === true,
1952
- tokens: parseTokens(query),
1953
- normalizedQuery: normalizeSearchPhrase(query),
1954
- limit: parseLimit(options.limit),
1955
- projection: parseProjectionConfig(options),
1956
- modeWasExplicit: typeof options.mode === "string" && options.mode.trim().length > 0
1957
- };
1958
- }
1959
- async function resolveSearchRuntimeContext(prepared, global2) {
1960
- const pmRoot = resolvePmRoot(process.cwd(), global2.path);
1961
- if (!await pathExists(getSettingsPath(pmRoot))) {
1962
- throw new PmCliError(`Tracker is not initialized at ${pmRoot}. Run pm init first.`, EXIT_CODE.NOT_FOUND);
1963
- }
1964
- const storedSettings = await readSettings(pmRoot);
1965
- const settings = resolveSettingsWithSemanticRuntimeDefaults(storedSettings).settings;
1966
- const statusRegistry = resolveRuntimeStatusRegistry(settings.schema);
1967
- const runtimeFieldRegistry = resolveRuntimeFieldRegistry(settings.schema);
1968
- validateSearchProjectionFields(prepared.projection, runtimeFieldRegistry);
1969
- const runtimeFieldFilters = collectRuntimeFilterValues(prepared.options, runtimeFieldRegistry, "search");
1970
- const typeRegistry = resolveItemTypeRegistry(settings, getActiveExtensionRegistrations());
1971
- const providerResolution = resolveEmbeddingProviders(settings);
1972
- const vectorResolution = resolveVectorStores(settings);
1973
- const extensionSearchProvider = resolveExtensionSearchProvider(settings);
1974
- const extensionVectorAdapter = resolveExtensionVectorAdapter(settings);
1975
- const semanticWeightOverride = parseSemanticWeightOverride(prepared.options.semanticWeight);
1976
- const queryExpansion = resolveQueryExpansionConfig(settings, providerResolution.active?.name ?? null);
1977
- const rerank = resolveRerankConfig(settings, providerResolution.active?.model ?? toOptionalNonEmptyString(settings.search?.embedding_model) ?? "text-embedding-3-small");
1978
- return {
1979
- pmRoot,
1980
- settings,
1981
- statusRegistry,
1982
- runtimeFieldRegistry,
1983
- runtimeFieldFilters,
1984
- typeRegistry,
1985
- maxResults: resolveSearchMaxResults(settings),
1986
- scoreThreshold: prepared.minScoreOverride ?? resolveSearchScoreThreshold(settings),
1987
- semanticWeightProvided: prepared.options.semanticWeight !== void 0,
1988
- semanticWeightOverride,
1989
- hybridSemanticWeight: semanticWeightOverride ?? resolveHybridSemanticWeight(settings),
1990
- tuning: resolveSearchTuning(settings),
1991
- providerResolution,
1992
- vectorResolution,
1993
- extensionSearchProvider,
1994
- extensionVectorAdapter,
1995
- bm25Mode: resolveBuiltInBm25Mode({
1996
- configuredProvider: toOptionalNonEmptyString(settings.search?.provider),
1997
- hasEmbeddingProvider: providerResolution.active !== null,
1998
- hasExtensionSearchProvider: extensionSearchProvider !== null
1999
- }),
2000
- queryExpansion,
2001
- queryExpansionExtension: resolveQueryExpansionExtension(queryExpansion),
2002
- rerank,
2003
- rerankExtension: resolveRerankExtension(settings),
2004
- effectiveMode: parseMode(prepared.options.mode, {
2005
- hasProvider: providerResolution.active !== null || extensionSearchProvider !== null,
2006
- hasVectorStore: vectorResolution.active !== null || extensionVectorAdapter !== null
2007
- })
2008
- };
2009
- }
2010
- async function loadFilteredSearchCorpus(prepared, runtime) {
2011
- const loadedDocuments = await loadDocuments(runtime.pmRoot, runtime.settings.item_format ?? "toon", runtime.typeRegistry.type_to_folder, runtime.settings.schema);
2012
- const statusFilter = parseStatusFilterCsv(typeof prepared.options.status === "string" ? prepared.options.status : void 0, runtime.statusRegistry, { strict: true });
2013
- const lifecycleClassifier = lifecycleClassifierFromStatusRegistry(runtime.statusRegistry);
2014
- const metadataFilteredDocuments = applyFilters(loadedDocuments.documents, prepared.options, runtime.typeRegistry, runtime.runtimeFieldFilters, statusFilter, lifecycleClassifier);
2015
- return {
2016
- warnings: loadedDocuments.warnings,
2017
- allDocuments: loadedDocuments.documents,
2018
- filteredDocuments: applyExactQueryFilters(metadataFilteredDocuments, prepared.normalizedQuery, {
2019
- titleExact: prepared.titleExact,
2020
- phraseExact: prepared.phraseExact || prepared.matchMode === "exact"
2021
- })
2022
- };
2023
- }
2024
- async function collectLinkedCorpusById(includeLinked, effectiveMode, filteredDocuments) {
2025
- const linkedCorpusById = /* @__PURE__ */ new Map();
2026
- if (!includeLinked || effectiveMode !== "keyword" && effectiveMode !== "hybrid") {
2027
- return linkedCorpusById;
2028
- }
2029
- const projectRoot = process.cwd();
2030
- const linkedCorpusRoots = await resolveLinkedCorpusRoots(projectRoot, resolveGlobalPmRoot(projectRoot));
2031
- const linkedCorpusEntries = await Promise.all(filteredDocuments.map(async (document) => [document.metadata.id, await loadLinkedCorpus(document, linkedCorpusRoots)]));
2032
- for (const [id, corpus] of linkedCorpusEntries) {
2033
- linkedCorpusById.set(id, corpus);
2034
- }
2035
- return linkedCorpusById;
2036
- }
2037
- async function computeKeywordSearchHits(prepared, runtime, filteredDocuments) {
2038
- const linkedCorpusById = await collectLinkedCorpusById(prepared.includeLinked, runtime.effectiveMode, filteredDocuments);
2039
- const applyCoverageBonus = prepared.matchMode === "or";
2040
- return filteredDocuments.map((document) => buildHybridLexicalScore(document, prepared.tokens, prepared.normalizedQuery, prepared.includeLinked, linkedCorpusById, runtime.tuning, runtime.settings.id_prefix, applyCoverageBonus)).filter((entry) => entry !== null).filter((entry) => prepared.matchMode !== "and" || entry.matched_all_terms === true);
2041
- }
2042
- function buildEmptySearchResultFromContext(response, countOnly) {
2043
- return emptySearchResult(response.query, response.effectiveMode, response.matchMode, response.options, response.includeLinked, response.scoreThreshold, response.hybridSemanticWeight, response.queryExpansion, response.rerank, response.projection, response.warnings, response.runtimeFieldFilters, countOnly);
2044
- }
2045
- async function executeBuiltInBm25Search(prepared, runtime, filteredDocuments, keywordHits, warnings) {
2046
- if (runtime.bm25Mode === null || runtime.effectiveMode === "keyword") {
2047
- return null;
2048
- }
2049
- const hits = computeBuiltInBm25Hits({
2050
- requestedMode: runtime.effectiveMode,
2051
- query: prepared.query,
2052
- filteredDocuments,
2053
- keywordHits,
2054
- corpusFields: resolveSearchCorpusFields(runtime.settings),
2055
- bm25Params: resolveBm25Params(runtime.settings),
2056
- hybridSemanticWeight: runtime.hybridSemanticWeight
2057
- });
2058
- if (runtime.bm25Mode === "auto-fallback") {
2059
- warnings.push(`search_${runtime.effectiveMode}_offline_bm25:no_embedding_provider:using_lexical_bm25`);
2060
- }
2061
- return hits;
2062
- }
2063
- async function executeExtensionSearchProvider(prepared, runtime, filteredDocuments, filteredById) {
2064
- if (!runtime.extensionSearchProvider) {
2065
- return null;
2066
- }
2067
- const canUseBuiltInSemantic = runtime.providerResolution.active !== null && (runtime.vectorResolution.active !== null || runtime.extensionVectorAdapter !== null);
2068
- try {
2069
- const providerResponse = await Promise.resolve(runtime.extensionSearchProvider.query({
2070
- query: prepared.query,
2071
- mode: runtime.effectiveMode,
2072
- tokens: prepared.tokens,
2073
- options: prepared.options,
2074
- settings: runtime.settings,
2075
- documents: filteredDocuments
2076
- }));
2077
- return normalizeExtensionProviderHits(runtime.extensionSearchProvider.providerName, providerResponse, filteredById);
2078
- } catch (error) {
2079
- if (!canUseBuiltInSemantic) {
2080
- throw new PmCliError(`Extension search provider "${runtime.extensionSearchProvider.providerName}" failed: ${error instanceof Error ? error.message : String(error)}`, EXIT_CODE.GENERIC_FAILURE);
2081
- }
2082
- return null;
2083
- }
2084
- }
2085
- function maybeApplyNoVectorFallback(effectiveMode, semanticResult, keywordHits, warnings) {
2086
- if (semanticResult.vectorMatchCount > 0) {
2087
- return semanticResult.hits;
2088
- }
2089
- warnings.push(`search_${effectiveMode}_degraded:no_vector_matches:results_are_lexical`);
2090
- return effectiveMode === "semantic" ? keywordHits : semanticResult.hits;
2091
- }
2092
- async function prepareBuiltInSemanticSearch(runtime, effectiveMode, filteredDocuments, warnings, modeWasExplicit) {
2093
- const builtInSemanticWillRun = !runtime.extensionSearchProvider && runtime.providerResolution.active !== null && (runtime.vectorResolution.active !== null || runtime.extensionVectorAdapter !== null);
2094
- if (modeWasExplicit && builtInSemanticWillRun) {
2095
- await maybeEmitVectorIndexStaleWarning(runtime.pmRoot, filteredDocuments, warnings);
2096
- }
2097
- if (!runtime.extensionSearchProvider) {
2098
- requireSemanticDependencies(effectiveMode, runtime.providerResolution, runtime.vectorResolution, runtime.extensionVectorAdapter !== null);
2099
- }
2100
- }
2101
- async function executeSemanticSearch(input) {
2102
- const { prepared, runtime, filteredDocuments, keywordHits, warnings, modeWasExplicit } = input;
2103
- let hits = keywordHits;
2104
- const bm25Hits = await executeBuiltInBm25Search(prepared, runtime, filteredDocuments, keywordHits, warnings);
2105
- const semanticMode = runtime.effectiveMode;
2106
- if (bm25Hits !== null || semanticMode === "keyword") {
2107
- return { effectiveMode: runtime.effectiveMode, hits: bm25Hits ?? hits };
2108
- }
2109
- try {
2110
- await prepareBuiltInSemanticSearch(runtime, semanticMode, filteredDocuments, warnings, modeWasExplicit);
2111
- if (filteredDocuments.length === 0 || prepared.limit === 0) {
2112
- return { effectiveMode: runtime.effectiveMode, hits: [] };
2113
- }
2114
- const filteredById = new Map(filteredDocuments.map((document) => [document.metadata.id, document]));
2115
- hits = await executeExtensionSearchProvider(prepared, runtime, filteredDocuments, filteredById) ?? hits;
2116
- if (hits === keywordHits) {
2117
- const { provider, vectorStore } = requireSemanticDependencies(semanticMode, runtime.providerResolution, runtime.vectorResolution, runtime.extensionVectorAdapter !== null);
2118
- const semanticResult = await computeSemanticOrHybridHits({
2119
- requestedMode: semanticMode,
2120
- query: prepared.query,
2121
- filteredDocuments,
2122
- keywordHits,
2123
- hybridSemanticWeight: runtime.hybridSemanticWeight,
2124
- limit: prepared.limit,
2125
- maxResults: runtime.maxResults,
2126
- provider,
2127
- vectorStore,
2128
- extensionVectorAdapter: runtime.extensionVectorAdapter,
2129
- queryExpansion: runtime.queryExpansion,
2130
- queryExpansionExtension: runtime.queryExpansionExtension,
2131
- rerank: runtime.rerank,
2132
- rerankExtension: runtime.rerankExtension,
2133
- warnings,
2134
- settings: runtime.settings
2135
- });
2136
- hits = maybeApplyNoVectorFallback(semanticMode, semanticResult, keywordHits, warnings);
2137
- }
2138
- return { effectiveMode: runtime.effectiveMode, hits };
2139
- } catch (error) {
2140
- warnings.push(buildExplicitSemanticFallbackWarning(runtime.effectiveMode, error));
2141
- return { effectiveMode: "keyword", hits: keywordHits };
2142
- }
2143
- }
2144
- function buildCountOnlySearchResult(response, total) {
2145
- if (response.projection.mode === "compact" && response.options.compact === true) {
2146
- return withSearchWarnings({
2147
- query: response.query.trim(),
2148
- mode: response.effectiveMode,
2149
- items: [],
2150
- count: total,
2151
- total,
2152
- count_only: true,
2153
- filters: buildCompactSearchFilterSummary({
2154
- mode: response.effectiveMode,
2155
- matchMode: response.matchMode,
2156
- options: response.options,
2157
- includeLinked: response.includeLinked,
2158
- titleExact: response.titleExact,
2159
- phraseExact: response.phraseExact,
2160
- scoreThreshold: response.scoreThreshold,
2161
- hybridSemanticWeight: response.hybridSemanticWeight,
2162
- runtimeFieldFilters: response.runtimeFieldFilters
2163
- })
2164
- }, response.warnings);
2165
- }
2166
- const projectionFields = response.projection.mode === "full" ? null : [...response.projection.fields];
2167
- return withSearchWarnings({
2168
- query: response.query.trim(),
2169
- mode: response.effectiveMode,
2170
- items: [],
2171
- count: total,
2172
- total,
2173
- count_only: true,
2174
- filters: buildVerboseSearchFilters({
2175
- effectiveMode: response.effectiveMode,
2176
- matchMode: response.matchMode,
2177
- options: response.options,
2178
- includeLinked: response.includeLinked,
2179
- titleExact: response.titleExact,
2180
- phraseExact: response.phraseExact,
2181
- scoreThreshold: response.scoreThreshold,
2182
- hybridSemanticWeight: response.hybridSemanticWeight,
2183
- queryExpansion: response.queryExpansion,
2184
- rerank: response.rerank,
2185
- runtimeFieldFilters: response.runtimeFieldFilters
2186
- }),
2187
- projection: {
2188
- mode: response.projection.mode,
2189
- fields: projectionFields
2190
- },
2191
- now: nowIso()
2192
- }, response.warnings);
2193
- }
2194
- function withSearchWarnings(result, warnings) {
2195
- if (warnings.length === 0) {
2196
- return result;
2197
- }
2198
- return { ...result, warnings };
2199
- }
2200
- function attachSearchHighlights(prepared, filteredDocuments, limited) {
2201
- if (!prepared.highlight) {
2202
- return { hits: limited, projection: prepared.projection };
2203
- }
2204
- const documentById = new Map(filteredDocuments.map((document) => [document.metadata.id, document]));
2205
- const hits = limited.map((hit) => ({
2206
- ...hit,
2207
- highlights: buildHitHighlights(documentById.get(hit.item.id), hit.matched_fields, prepared.tokens)
2208
- }));
2209
- if (prepared.projection.mode === "full" || prepared.projection.fields.includes("highlights")) {
2210
- return { hits, projection: prepared.projection };
2211
- }
2212
- return { hits, projection: { mode: prepared.projection.mode, fields: [...prepared.projection.fields, "highlights"] } };
2213
- }
2214
- function buildSearchResultForHits(response, projectedItems, total, limitedCount, effectiveProjection) {
2215
- const truncationExtras = limitedCount < total ? { total } : {};
2216
- if (response.projection.mode === "compact" && response.options.compact === true) {
2217
- return withSearchWarnings({
2218
- query: response.query.trim(),
2219
- mode: response.effectiveMode,
2220
- items: projectedItems,
2221
- count: projectedItems.length,
2222
- ...truncationExtras,
2223
- filters: buildCompactSearchFilterSummary({
2224
- mode: response.effectiveMode,
2225
- matchMode: response.matchMode,
2226
- options: response.options,
2227
- includeLinked: response.includeLinked,
2228
- titleExact: response.titleExact,
2229
- phraseExact: response.phraseExact,
2230
- scoreThreshold: response.scoreThreshold,
2231
- hybridSemanticWeight: response.hybridSemanticWeight,
2232
- runtimeFieldFilters: response.runtimeFieldFilters
2233
- })
2234
- }, response.warnings);
2235
- }
2236
- const finalProjectionFields = effectiveProjection.mode === "full" ? null : [...effectiveProjection.fields];
2237
- return {
2238
- query: response.query.trim(),
2239
- mode: response.effectiveMode,
2240
- items: projectedItems,
2241
- count: projectedItems.length,
2242
- ...truncationExtras,
2243
- filters: buildVerboseSearchFilters({
2244
- effectiveMode: response.effectiveMode,
2245
- matchMode: response.matchMode,
2246
- options: response.options,
2247
- includeLinked: response.includeLinked,
2248
- titleExact: response.titleExact,
2249
- phraseExact: response.phraseExact,
2250
- scoreThreshold: response.scoreThreshold,
2251
- hybridSemanticWeight: response.hybridSemanticWeight,
2252
- queryExpansion: response.queryExpansion,
2253
- rerank: response.rerank,
2254
- runtimeFieldFilters: response.runtimeFieldFilters
2255
- }),
2256
- projection: {
2257
- mode: effectiveProjection.mode,
2258
- fields: finalProjectionFields
2259
- },
2260
- now: nowIso(),
2261
- ...response.warnings.length > 0 ? { warnings: response.warnings } : {}
2262
- };
2263
- }
2264
- async function runSearch(rawQuery, rawOptions, global2) {
2265
- const prepared = prepareSearchInput(rawQuery, rawOptions);
2266
- const runtime = await resolveSearchRuntimeContext(prepared, global2);
2267
- const corpus = await loadFilteredSearchCorpus(prepared, runtime);
2268
- const warnings = corpus.warnings;
2269
- warnings.push(...prepared.inlineWarnings);
2270
- if (runtime.effectiveMode === "hybrid" && runtime.semanticWeightProvided && runtime.semanticWeightOverride === void 0) {
2271
- warnings.push("search_hybrid_semantic_weight_override_invalid:using_settings_default");
2272
- }
2273
- const responseBase = {
2274
- query: prepared.query,
2275
- matchMode: prepared.matchMode,
2276
- options: prepared.options,
2277
- includeLinked: prepared.includeLinked,
2278
- titleExact: prepared.titleExact,
2279
- phraseExact: prepared.phraseExact,
2280
- scoreThreshold: runtime.scoreThreshold,
2281
- hybridSemanticWeight: runtime.hybridSemanticWeight,
2282
- queryExpansion: runtime.queryExpansion,
2283
- rerank: runtime.rerank,
2284
- projection: prepared.projection,
2285
- warnings,
2286
- runtimeFieldFilters: runtime.runtimeFieldFilters
2287
- };
2288
- if (runtime.effectiveMode === "keyword" && (corpus.filteredDocuments.length === 0 || prepared.limit === 0)) {
2289
- return buildEmptySearchResultFromContext({ ...responseBase, effectiveMode: runtime.effectiveMode }, prepared.countOnly);
2290
- }
2291
- const keywordHits = await computeKeywordSearchHits(prepared, runtime, corpus.filteredDocuments);
2292
- const modeResult = await executeSemanticSearch({
2293
- prepared,
2294
- runtime,
2295
- filteredDocuments: corpus.filteredDocuments,
2296
- keywordHits,
2297
- warnings,
2298
- modeWasExplicit: prepared.modeWasExplicit
2299
- });
2300
- if (modeResult.effectiveMode !== "keyword" && modeResult.hits.length === 0 && (corpus.filteredDocuments.length === 0 || prepared.limit === 0)) {
2301
- return buildEmptySearchResultFromContext({ ...responseBase, effectiveMode: modeResult.effectiveMode }, prepared.countOnly);
2302
- }
2303
- const thresholded = modeResult.hits.filter((entry) => entry.exact_id_match === true || entry.score >= runtime.scoreThreshold);
2304
- const sorted = sortHits(thresholded, runtime.statusRegistry);
2305
- const total = sorted.length;
2306
- const resolvedLimit = prepared.limit ?? runtime.maxResults;
2307
- const limited = sorted.slice(0, resolvedLimit);
2308
- const response = { ...responseBase, effectiveMode: modeResult.effectiveMode };
2309
- if (prepared.countOnly) {
2310
- return buildCountOnlySearchResult(response, total);
2311
- }
2312
- const { hits: projectedHits, projection: effectiveProjection } = attachSearchHighlights(prepared, corpus.filteredDocuments, limited);
2313
- const projectedItems = projectSearchHits(projectedHits, effectiveProjection);
2314
- return buildSearchResultForHits(response, projectedItems, total, limited.length, effectiveProjection);
2315
- }
2316
-
2317
- export {
2318
- normalizeLowercaseWhitespace,
2319
- tokenizeAlphaNumeric,
2320
- jaccardSimilarity,
2321
- collectErrorCauseCodes,
2322
- classifyImplicitSemanticFallbackReason,
2323
- _testOnlySearchCommand,
2324
- resolveSearchMaxResults,
2325
- resolveSearchScoreThreshold,
2326
- resolveHybridSemanticWeight,
2327
- resolveSearchTuning,
2328
- runSearch
2329
- };
2330
- //# sourceMappingURL=chunk-5B3X4Y22.js.map