@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,2046 +0,0 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c63a3843-4fe5-59f1-a28c-51139dae3ccd")}catch(e){}}();
3
- import {
4
- locateItem,
5
- readLocatedItem
6
- } from "./chunk-57C2RLW5.js";
7
- import {
8
- nowIso
9
- } from "./chunk-FJRKQREY.js";
10
- import {
11
- getActiveExtensionRegistrations,
12
- readSettings
13
- } from "./chunk-US3T3W5J.js";
14
- import {
15
- coercePositiveInteger,
16
- getSettingsPath,
17
- isFiniteNumberArray,
18
- pathExists,
19
- readFileIfExists,
20
- removeFileIfExists,
21
- resolveItemTypeRegistry,
22
- resolvePmPackageRootFromModule,
23
- toErrorMessage,
24
- toNonEmptyString,
25
- trimTrailingSlashes,
26
- writeFileAtomic
27
- } from "./chunk-YD5FML7K.js";
28
-
29
- // dist/core/search/http-client.js
30
- var DEFAULT_SEARCH_HTTP_TIMEOUT_MS = 3e4;
31
- function normalizeSearchHttpTimeoutMs(timeoutMs, requestLabel, defaultTimeoutMs = DEFAULT_SEARCH_HTTP_TIMEOUT_MS) {
32
- const resolved = timeoutMs ?? defaultTimeoutMs;
33
- if (!Number.isFinite(resolved) || resolved <= 0) {
34
- throw new Error(`${requestLabel} timeout must be a positive finite number`);
35
- }
36
- return Math.floor(resolved);
37
- }
38
- function resolveSearchHttpFetcher(fetcher, requestLabel) {
39
- if (fetcher) {
40
- return fetcher;
41
- }
42
- if (typeof globalThis.fetch === "function") {
43
- return globalThis.fetch.bind(globalThis);
44
- }
45
- throw new Error(`${requestLabel} execution requires a fetch implementation`);
46
- }
47
- async function readFailedSearchHttpResponseBody(response) {
48
- try {
49
- return (await response.text()).replaceAll(/\s+/g, " ").trim();
50
- } catch (error) {
51
- return `(failed to read response body: ${toErrorMessage(error)})`;
52
- }
53
- }
54
- async function executeSearchJsonRequest(options) {
55
- const controller = new AbortController();
56
- const timeoutHandle = setTimeout(() => {
57
- controller.abort();
58
- }, options.timeoutMs);
59
- try {
60
- let response;
61
- try {
62
- response = await options.fetcher(options.endpoint, {
63
- method: options.method,
64
- headers: options.headers,
65
- body: JSON.stringify(options.body),
66
- signal: controller.signal
67
- });
68
- } catch (error) {
69
- if (error instanceof Error && error.name === "AbortError") {
70
- throw new Error(`${options.requestLabel} timed out after ${options.timeoutMs}ms`);
71
- }
72
- throw new Error(`${options.requestLabel} execution failed: ${toErrorMessage(error)}`);
73
- }
74
- if (!response.ok) {
75
- const responseBody = await readFailedSearchHttpResponseBody(response);
76
- const detail = responseBody.length > 0 ? `: ${responseBody}` : "";
77
- throw new Error(`${options.requestLabel} failed with status ${response.status} ${response.statusText}${detail}`);
78
- }
79
- try {
80
- return await response.json();
81
- } catch (error) {
82
- throw new Error(`${options.responseLabel} JSON parse failed: ${toErrorMessage(error)}`);
83
- }
84
- } finally {
85
- clearTimeout(timeoutHandle);
86
- }
87
- }
88
-
89
- // dist/core/search/providers.js
90
- function resolveProviderConfigSource(activeName, configured) {
91
- const active = toNonEmptyString(activeName);
92
- if (!active) {
93
- return "unconfigured";
94
- }
95
- const configuredValue = toNonEmptyString(configured);
96
- return configuredValue && configuredValue.toLowerCase() === active.toLowerCase() ? "configured" : "auto-detected";
97
- }
98
- function normalizeOpenAiEmbeddingsEndpoint(baseUrl) {
99
- const normalizedBaseUrl = trimTrailingSlashes(baseUrl);
100
- const normalizedLower = normalizedBaseUrl.toLowerCase();
101
- if (normalizedLower.endsWith("/embeddings")) {
102
- return normalizedBaseUrl;
103
- }
104
- if (normalizedLower.endsWith("/v1")) {
105
- return `${normalizedBaseUrl}/embeddings`;
106
- }
107
- return `${normalizedBaseUrl}/v1/embeddings`;
108
- }
109
- function resolveSearchEmbeddingModelOverride(settings) {
110
- const candidate = settings.search?.embedding_model;
111
- return toNonEmptyString(candidate) || null;
112
- }
113
- function resolveOpenAiProvider(settings) {
114
- const baseUrl = toNonEmptyString(settings.providers?.openai?.base_url);
115
- const model = toNonEmptyString(settings.providers?.openai?.model);
116
- if (!baseUrl || !model) {
117
- return null;
118
- }
119
- const override = resolveSearchEmbeddingModelOverride(settings);
120
- const apiKey = toNonEmptyString(settings.providers?.openai?.api_key);
121
- return {
122
- name: "openai",
123
- base_url: baseUrl,
124
- model: override ?? model,
125
- ...apiKey ? { api_key: apiKey } : {}
126
- };
127
- }
128
- function resolveOllamaProvider(settings) {
129
- const baseUrl = toNonEmptyString(settings.providers?.ollama?.base_url);
130
- const model = toNonEmptyString(settings.providers?.ollama?.model);
131
- if (!baseUrl || !model) {
132
- return null;
133
- }
134
- const override = resolveSearchEmbeddingModelOverride(settings);
135
- return {
136
- name: "ollama",
137
- base_url: baseUrl,
138
- model: override ?? model
139
- };
140
- }
141
- function normalizeEmbeddingInputs(input) {
142
- const inputs = (Array.isArray(input) ? input : [input]).map((entry) => entry.trim()).filter((entry) => entry.length > 0);
143
- if (inputs.length === 0) {
144
- throw new Error("Embedding input must include at least one non-empty string");
145
- }
146
- return inputs;
147
- }
148
- function dedupeEmbeddingInputs(inputs) {
149
- const uniqueInputs = [];
150
- const originalToUniqueIndex = [];
151
- const uniqueIndexByInput = /* @__PURE__ */ new Map();
152
- for (const entry of inputs) {
153
- const existingUniqueIndex = uniqueIndexByInput.get(entry);
154
- if (existingUniqueIndex === void 0) {
155
- const nextUniqueIndex = uniqueInputs.length;
156
- uniqueInputs.push(entry);
157
- uniqueIndexByInput.set(entry, nextUniqueIndex);
158
- originalToUniqueIndex.push(nextUniqueIndex);
159
- continue;
160
- }
161
- originalToUniqueIndex.push(existingUniqueIndex);
162
- }
163
- return {
164
- uniqueInputs,
165
- originalToUniqueIndex
166
- };
167
- }
168
- function buildOrderedOpenAiEntries(data) {
169
- const openAiEntries = data.map((entry, position) => ({
170
- embedding: entry.embedding,
171
- index: entry.index,
172
- position
173
- }));
174
- const hasExplicitIndex = openAiEntries.some((entry) => entry.index !== void 0);
175
- if (hasExplicitIndex) {
176
- for (const entry of openAiEntries) {
177
- if (!Number.isInteger(entry.index)) {
178
- throw new TypeError(`OpenAI embedding response entry at position ${entry.position} is missing a valid integer index`);
179
- }
180
- }
181
- return [...openAiEntries].sort((a, b) => {
182
- const byIndex = a.index - b.index;
183
- if (byIndex !== 0) {
184
- return byIndex;
185
- }
186
- return a.position - b.position;
187
- });
188
- }
189
- return openAiEntries;
190
- }
191
- function resolveEmbeddingProviders(settings) {
192
- const openAi = resolveOpenAiProvider(settings);
193
- const ollama = resolveOllamaProvider(settings);
194
- const available = [openAi, ollama].filter((entry) => entry !== null);
195
- const preferredName = toNonEmptyString(settings.search?.provider);
196
- const preferredKey = preferredName ? preferredName.toLowerCase() : null;
197
- const preferred = preferredKey ? available.find((entry) => entry.name === preferredKey) : void 0;
198
- return {
199
- active: preferred ?? available[0] ?? null,
200
- available
201
- };
202
- }
203
- function resolveEmbeddingRequestTarget(provider) {
204
- const baseUrl = trimTrailingSlashes(provider.base_url);
205
- if (provider.name === "openai") {
206
- return {
207
- provider: "openai",
208
- endpoint: normalizeOpenAiEmbeddingsEndpoint(baseUrl),
209
- model: provider.model
210
- };
211
- }
212
- return {
213
- provider: "ollama",
214
- endpoint: `${baseUrl}/api/embed`,
215
- model: provider.model
216
- };
217
- }
218
- function buildEmbeddingRequestPlan(provider, input) {
219
- const normalizedInputs = normalizeEmbeddingInputs(input);
220
- if (provider.name === "openai") {
221
- return {
222
- target: resolveEmbeddingRequestTarget(provider),
223
- method: "POST",
224
- headers: {
225
- "content-type": "application/json",
226
- ...provider.api_key ? { authorization: `Bearer ${provider.api_key}` } : {}
227
- },
228
- body: {
229
- model: provider.model,
230
- input: normalizedInputs.length === 1 ? normalizedInputs[0] : normalizedInputs
231
- }
232
- };
233
- }
234
- return {
235
- target: resolveEmbeddingRequestTarget(provider),
236
- method: "POST",
237
- headers: {
238
- "content-type": "application/json"
239
- },
240
- body: {
241
- model: provider.model,
242
- input: normalizedInputs
243
- }
244
- };
245
- }
246
- function normalizeEmbeddingResponse(provider, response) {
247
- if (provider.name === "openai") {
248
- const data = response.data;
249
- if (!Array.isArray(data) || data.length === 0) {
250
- throw new Error("OpenAI embedding response must include a non-empty data array");
251
- }
252
- const orderedEntries = buildOrderedOpenAiEntries(data);
253
- return orderedEntries.map((entry, index) => {
254
- const embedding = entry.embedding;
255
- if (!isFiniteNumberArray(embedding)) {
256
- throw new Error(`OpenAI embedding response entry at index ${index} is missing a numeric embedding vector`);
257
- }
258
- return [...embedding];
259
- });
260
- }
261
- const singleEmbedding = response.embedding;
262
- if (isFiniteNumberArray(singleEmbedding)) {
263
- return [[...singleEmbedding]];
264
- }
265
- const multipleEmbeddings = response.embeddings;
266
- if (Array.isArray(multipleEmbeddings) && multipleEmbeddings.length > 0) {
267
- return multipleEmbeddings.map((entry, index) => {
268
- if (!isFiniteNumberArray(entry)) {
269
- throw new Error(`Ollama embedding response entry at index ${index} is missing a numeric embedding vector`);
270
- }
271
- return [...entry];
272
- });
273
- }
274
- throw new Error("Ollama embedding response must include embedding or embeddings vectors");
275
- }
276
- async function executeEmbeddingRequest(provider, input, options = {}) {
277
- const timeoutMs = normalizeSearchHttpTimeoutMs(options.timeout_ms, "Embedding request");
278
- const fetcher = resolveSearchHttpFetcher(options.fetcher, "Embedding request");
279
- const normalizedInputs = normalizeEmbeddingInputs(input);
280
- const dedupedInputs = dedupeEmbeddingInputs(normalizedInputs);
281
- const requestPlan = buildEmbeddingRequestPlan(provider, dedupedInputs.uniqueInputs);
282
- const payload = await executeSearchJsonRequest({
283
- endpoint: requestPlan.target.endpoint,
284
- method: requestPlan.method,
285
- headers: requestPlan.headers,
286
- body: requestPlan.body,
287
- timeoutMs,
288
- fetcher,
289
- requestLabel: "Embedding request",
290
- responseLabel: "Embedding response"
291
- });
292
- const vectors = normalizeEmbeddingResponse(provider, payload);
293
- if (vectors.length !== dedupedInputs.uniqueInputs.length) {
294
- throw new Error(`Embedding response cardinality mismatch: expected ${dedupedInputs.uniqueInputs.length} vector(s), received ${vectors.length}`);
295
- }
296
- return dedupedInputs.originalToUniqueIndex.map((uniqueIndex) => [...vectors[uniqueIndex]]);
297
- }
298
-
299
- // dist/core/search/corpus.js
300
- var DEFAULT_SEARCH_CORPUS_FIELDS = [
301
- "title",
302
- "description",
303
- "tags",
304
- "status",
305
- "type",
306
- "priority",
307
- "assignee",
308
- "parent",
309
- "goal",
310
- "value",
311
- "why_now",
312
- "risk",
313
- "confidence",
314
- "estimated_minutes",
315
- "acceptance_criteria",
316
- "resolution",
317
- "expected_result",
318
- "actual_result",
319
- "body",
320
- "comments",
321
- "notes",
322
- "learnings",
323
- "reminders",
324
- "events",
325
- "dependencies",
326
- "plan"
327
- ];
328
- function resolveSearchCorpusFields(settings) {
329
- const configured = settings?.search?.corpus_fields;
330
- if (!Array.isArray(configured)) {
331
- return [...DEFAULT_SEARCH_CORPUS_FIELDS];
332
- }
333
- const knownFields = new Set(DEFAULT_SEARCH_CORPUS_FIELDS);
334
- const selected = Array.from(new Set(configured.filter((entry) => typeof entry === "string").map((entry) => entry.trim()).filter((entry) => entry.length > 0 && knownFields.has(entry))));
335
- return selected.length > 0 ? selected : [...DEFAULT_SEARCH_CORPUS_FIELDS];
336
- }
337
- var DEFAULT_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS = 8e3;
338
- var OLLAMA_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS = 3200;
339
- var SEMANTIC_CORPUS_TRUNCATION_SUFFIX = "...[semantic corpus truncated]";
340
- var SEARCH_EMBEDDING_CORPUS_MAX_CHARACTERS_INVALID_WARNING = "search_embedding_corpus_max_characters_invalid:using_provider_default";
341
- function compactParts(parts) {
342
- return parts.map((part) => part === void 0 || part === null ? "" : String(part).trim()).filter((part) => part.length > 0).join(" ");
343
- }
344
- function buildReminderCorpus(item) {
345
- return (item.reminders ?? []).map((reminder) => compactParts([reminder.at, reminder.text]));
346
- }
347
- function buildEventCorpus(item) {
348
- return (item.events ?? []).map((event) => compactParts([
349
- event.start_at,
350
- event.end_at,
351
- event.title,
352
- event.description,
353
- event.location,
354
- event.all_day === true ? "all day" : void 0,
355
- event.timezone,
356
- event.recurrence?.freq,
357
- event.recurrence?.interval,
358
- event.recurrence?.count,
359
- event.recurrence?.until,
360
- event.recurrence?.by_weekday?.join(" "),
361
- event.recurrence?.by_month_day?.join(" "),
362
- event.recurrence?.exdates?.join(" ")
363
- ]));
364
- }
365
- function appendPlanStepFlatCorpus(segments, step) {
366
- segments.push(step.title, step.body, step.status, step.owner, step.evidence, step.blocked_reason, step.superseded_by);
367
- for (const link of step.linked_items ?? []) {
368
- segments.push(`${link.kind} ${link.id}`, link.note);
369
- }
370
- for (const file of step.files ?? [])
371
- segments.push(file.path, file.note);
372
- for (const test of step.tests ?? [])
373
- segments.push(test.command, test.path, test.note);
374
- for (const doc of step.docs ?? [])
375
- segments.push(doc.path, doc.note);
376
- }
377
- function appendPlanMetadataFlatCorpus(segments, item) {
378
- for (const decision of item.plan_decisions ?? []) {
379
- segments.push(decision.decision, decision.rationale, decision.evidence);
380
- }
381
- for (const discovery of item.plan_discoveries ?? []) {
382
- segments.push(discovery.text);
383
- }
384
- for (const check of item.plan_validation ?? []) {
385
- segments.push(check.text, check.command, check.expected);
386
- }
387
- }
388
- function buildPlanFlatCorpus(item) {
389
- const segments = [];
390
- segments.push(item.plan_mode, item.plan_scope, item.plan_harness, item.plan_resume_context);
391
- for (const step of item.plan_steps ?? []) {
392
- appendPlanStepFlatCorpus(segments, step);
393
- }
394
- appendPlanMetadataFlatCorpus(segments, item);
395
- return segments.filter((segment) => typeof segment === "string" && segment.length > 0).join(" ");
396
- }
397
- function buildPlanCorpus(item) {
398
- const steps = (item.plan_steps ?? []).map((step) => compactParts([
399
- step.order,
400
- step.id,
401
- step.title,
402
- step.body,
403
- step.status,
404
- step.owner,
405
- step.evidence,
406
- step.blocked_reason,
407
- step.superseded_by,
408
- (step.linked_items ?? []).map((link) => compactParts([link.kind, link.id, link.note])).join(" "),
409
- (step.files ?? []).map((file) => compactParts([file.path, file.note])).join(" "),
410
- (step.tests ?? []).map((test) => compactParts([test.command, test.path, test.note])).join(" "),
411
- (step.docs ?? []).map((doc) => compactParts([doc.path, doc.note])).join(" ")
412
- ]));
413
- const decisions = (item.plan_decisions ?? []).map((entry) => compactParts([entry.decision, entry.rationale, entry.evidence, entry.step_id]));
414
- const discoveries = (item.plan_discoveries ?? []).map((entry) => compactParts([entry.text, entry.step_id]));
415
- const validation = (item.plan_validation ?? []).map((entry) => compactParts([entry.text, entry.command, entry.expected]));
416
- const hasPlanContent = item.plan_mode !== void 0 || item.plan_scope !== void 0 || item.plan_harness !== void 0 || item.plan_resume_context !== void 0 || steps.length > 0 || decisions.length > 0 || discoveries.length > 0 || validation.length > 0;
417
- if (!hasPlanContent) {
418
- return void 0;
419
- }
420
- return {
421
- mode: item.plan_mode,
422
- scope: item.plan_scope,
423
- harness: item.plan_harness,
424
- resume_context: item.plan_resume_context,
425
- steps,
426
- decisions,
427
- discoveries,
428
- validation
429
- };
430
- }
431
- function isNonEmptyString(value) {
432
- return typeof value === "string" && value.trim().length > 0;
433
- }
434
- var CORPUS_FIELD_BUILDERS = {
435
- title: (document) => document.metadata.title,
436
- description: (document) => document.metadata.description,
437
- tags: (document) => document.metadata.tags,
438
- status: (document) => document.metadata.status,
439
- type: (document) => document.metadata.type,
440
- priority: (document) => typeof document.metadata.priority === "number" ? document.metadata.priority : void 0,
441
- assignee: (document) => isNonEmptyString(document.metadata.assignee) ? document.metadata.assignee : void 0,
442
- parent: (document) => isNonEmptyString(document.metadata.parent) ? document.metadata.parent : void 0,
443
- goal: (document) => isNonEmptyString(document.metadata.goal) ? document.metadata.goal : void 0,
444
- value: (document) => isNonEmptyString(document.metadata.value) ? document.metadata.value : void 0,
445
- why_now: (document) => isNonEmptyString(document.metadata.why_now) ? document.metadata.why_now : void 0,
446
- risk: (document) => isNonEmptyString(document.metadata.risk) ? document.metadata.risk : void 0,
447
- confidence: (document) => document.metadata.confidence !== void 0 && document.metadata.confidence !== null ? document.metadata.confidence : void 0,
448
- estimated_minutes: (document) => typeof document.metadata.estimated_minutes === "number" ? document.metadata.estimated_minutes : void 0,
449
- acceptance_criteria: (document) => isNonEmptyString(document.metadata.acceptance_criteria) ? document.metadata.acceptance_criteria : void 0,
450
- resolution: (document) => isNonEmptyString(document.metadata.resolution) ? document.metadata.resolution : void 0,
451
- expected_result: (document) => isNonEmptyString(document.metadata.expected_result) ? document.metadata.expected_result : void 0,
452
- actual_result: (document) => isNonEmptyString(document.metadata.actual_result) ? document.metadata.actual_result : void 0,
453
- body: (document) => document.body,
454
- comments: (document) => (document.metadata.comments ?? []).map((entry) => entry.text),
455
- notes: (document) => (document.metadata.notes ?? []).map((entry) => entry.text),
456
- learnings: (document) => (document.metadata.learnings ?? []).map((entry) => entry.text),
457
- reminders: (document) => buildReminderCorpus(document.metadata),
458
- events: (document) => buildEventCorpus(document.metadata),
459
- dependencies: (document) => (document.metadata.dependencies ?? []).map((entry) => ({
460
- id: entry.id,
461
- kind: entry.kind
462
- })),
463
- plan: (document) => buildPlanCorpus(document.metadata)
464
- };
465
- function buildSearchCorpus(document, options = {}) {
466
- const fields = options.fields ?? DEFAULT_SEARCH_CORPUS_FIELDS;
467
- const corpus = {};
468
- for (const field of fields) {
469
- const builder = CORPUS_FIELD_BUILDERS[field];
470
- if (!builder) {
471
- continue;
472
- }
473
- const value = builder(document);
474
- if (value === void 0) {
475
- continue;
476
- }
477
- corpus[field] = value;
478
- }
479
- return corpus;
480
- }
481
- function resolveSemanticCorpusInputCharacterLimit(providerName) {
482
- if (providerName?.trim().toLowerCase() === "ollama") {
483
- return OLLAMA_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS;
484
- }
485
- return DEFAULT_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS;
486
- }
487
- function resolveSemanticCorpusCharacterLimit(providerName, configuredMaxCharacters) {
488
- const providerDefaultLimit = resolveSemanticCorpusInputCharacterLimit(providerName);
489
- const parsed = coercePositiveInteger(configuredMaxCharacters);
490
- if (parsed !== null) {
491
- return {
492
- maxCharacters: parsed,
493
- warning: null
494
- };
495
- }
496
- return {
497
- maxCharacters: providerDefaultLimit,
498
- warning: configuredMaxCharacters === void 0 || configuredMaxCharacters === null ? null : SEARCH_EMBEDDING_CORPUS_MAX_CHARACTERS_INVALID_WARNING
499
- };
500
- }
501
- function buildSemanticCorpusInput(document, options = {}) {
502
- const serialized = JSON.stringify(buildSearchCorpus(document, { fields: options.fields }));
503
- const maxCharacters = resolveSemanticCorpusCharacterLimit(options.providerName, options.maxCharacters).maxCharacters;
504
- if (serialized.length <= maxCharacters) {
505
- return serialized;
506
- }
507
- if (maxCharacters <= SEMANTIC_CORPUS_TRUNCATION_SUFFIX.length) {
508
- return SEMANTIC_CORPUS_TRUNCATION_SUFFIX.slice(0, maxCharacters);
509
- }
510
- const keepLength = Math.max(0, maxCharacters - SEMANTIC_CORPUS_TRUNCATION_SUFFIX.length);
511
- return `${serialized.slice(0, keepLength)}${SEMANTIC_CORPUS_TRUNCATION_SUFFIX}`;
512
- }
513
-
514
- // dist/core/search/semantic-defaults.js
515
- import { spawnSync } from "node:child_process";
516
- var DISABLE_AUTO_DEFAULTS_ENV = "PM_DISABLE_OLLAMA_AUTO_DEFAULTS";
517
- var OLLAMA_MODEL_ENV = "PM_OLLAMA_MODEL";
518
- var DEFAULT_OLLAMA_BASE_URL = "http://localhost:11434";
519
- var DEFAULT_OLLAMA_MODEL = "qwen3-embedding:0.6b";
520
- var DEFAULT_LANCEDB_PATH = ".agents/pm/search/lancedb/";
521
- var OLLAMA_VERSION_TIMEOUT_MS = 1500;
522
- var OLLAMA_LIST_TIMEOUT_MS = 2500;
523
- var QWEN_EMBEDDING_MODEL_PATTERN = /qwen.*(?:embed|embedding)|(?:embed|embedding).*qwen/i;
524
- var EMBEDDING_MODEL_PATTERN = /embed|embedding/i;
525
- var toOptionalNonEmptyString = toNonEmptyString;
526
- function isAutoDefaultsDisabled() {
527
- const raw = toOptionalNonEmptyString(process.env[DISABLE_AUTO_DEFAULTS_ENV]);
528
- if (!raw) {
529
- return false;
530
- }
531
- const normalized = raw.toLowerCase();
532
- return normalized === "1" || normalized === "true" || normalized === "yes";
533
- }
534
- function hasConfiguredValue(values) {
535
- return values.some((entry) => toOptionalNonEmptyString(entry) !== null);
536
- }
537
- function hasCompetingProvider(provider) {
538
- const normalized = toOptionalNonEmptyString(provider);
539
- return Boolean(normalized && normalized.toLowerCase() !== "ollama");
540
- }
541
- function hasCompetingVectorAdapter(adapter) {
542
- const normalized = toOptionalNonEmptyString(adapter);
543
- return Boolean(normalized && normalized.toLowerCase() !== "lancedb");
544
- }
545
- function hasCompetingSemanticConfiguration(settings) {
546
- if (hasCompetingProvider(settings.search?.provider)) {
547
- return true;
548
- }
549
- if (hasCompetingVectorAdapter(settings.vector_store?.adapter)) {
550
- return true;
551
- }
552
- if (hasConfiguredValue([
553
- settings.providers?.openai?.base_url,
554
- settings.providers?.openai?.model,
555
- settings.providers?.openai?.api_key
556
- ])) {
557
- return true;
558
- }
559
- return hasConfiguredValue([
560
- settings.vector_store?.qdrant?.url,
561
- settings.vector_store?.qdrant?.api_key
562
- ]);
563
- }
564
- function isOllamaInstalled() {
565
- const result = spawnSync("ollama", ["--version"], {
566
- encoding: "utf8",
567
- timeout: OLLAMA_VERSION_TIMEOUT_MS
568
- });
569
- if (result.error) {
570
- return false;
571
- }
572
- return result.status === 0;
573
- }
574
- function parseOllamaModelList(output) {
575
- const lines = output.split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0);
576
- if (lines.length === 0) {
577
- return null;
578
- }
579
- const models = lines.map((line) => line.split(/\s+/)[0]?.trim()).filter((entry) => Boolean(entry && entry.length > 0)).filter((entry) => entry.toUpperCase() !== "NAME");
580
- if (models.length === 0) {
581
- return null;
582
- }
583
- const preferredQwenEmbeddingModel = models.find((entry) => QWEN_EMBEDDING_MODEL_PATTERN.test(entry));
584
- if (preferredQwenEmbeddingModel) {
585
- return preferredQwenEmbeddingModel;
586
- }
587
- const embeddingModel = models.find((entry) => EMBEDDING_MODEL_PATTERN.test(entry));
588
- return embeddingModel ?? null;
589
- }
590
- function resolveAutoOllamaModel(settings) {
591
- const settingsModel = toOptionalNonEmptyString(settings.providers?.ollama?.model);
592
- if (settingsModel) {
593
- return settingsModel;
594
- }
595
- const envModel = toOptionalNonEmptyString(process.env[OLLAMA_MODEL_ENV]);
596
- if (envModel) {
597
- return envModel;
598
- }
599
- const listed = spawnSync("ollama", ["list"], {
600
- encoding: "utf8",
601
- timeout: OLLAMA_LIST_TIMEOUT_MS
602
- });
603
- if (!listed.error && listed.status === 0) {
604
- const listedModel = parseOllamaModelList(typeof listed.stdout === "string" ? listed.stdout : "");
605
- if (listedModel) {
606
- return listedModel;
607
- }
608
- }
609
- return DEFAULT_OLLAMA_MODEL;
610
- }
611
- function resolveSemanticDefaultNeeds(settings) {
612
- return {
613
- baseUrl: toOptionalNonEmptyString(settings.providers?.ollama?.base_url) === null,
614
- model: toOptionalNonEmptyString(settings.providers?.ollama?.model) === null,
615
- lancedbPath: toOptionalNonEmptyString(settings.vector_store?.lancedb?.path) === null,
616
- embeddingModel: toOptionalNonEmptyString(settings.search?.embedding_model) === null
617
- };
618
- }
619
- function needsAnySemanticDefault(needs) {
620
- return needs.baseUrl || needs.model || needs.lancedbPath || needs.embeddingModel;
621
- }
622
- function applyOllamaProviderDefaults(settings, needs, resolvedModel) {
623
- if (!needs.baseUrl && !needs.model) {
624
- return;
625
- }
626
- const providers = settings.providers ??= {};
627
- const ollama = providers.ollama ??= {};
628
- if (needs.baseUrl) {
629
- ollama.base_url = DEFAULT_OLLAMA_BASE_URL;
630
- }
631
- if (needs.model) {
632
- ollama.model = resolvedModel;
633
- }
634
- }
635
- function applyVectorStoreDefaults(settings, needs) {
636
- if (!needs.lancedbPath) {
637
- return;
638
- }
639
- const vectorStore = settings.vector_store ??= {};
640
- const lancedb = vectorStore.lancedb ??= {};
641
- lancedb.path = DEFAULT_LANCEDB_PATH;
642
- }
643
- function applySearchEmbeddingDefaults(settings, needs, resolvedModel) {
644
- if (!needs.embeddingModel) {
645
- return;
646
- }
647
- const search = settings.search ??= {};
648
- search.embedding_model = resolvedModel;
649
- }
650
- function resolveSettingsWithSemanticRuntimeDefaults(settings) {
651
- const unchanged = {
652
- settings,
653
- auto_ollama_defaults_applied: false
654
- };
655
- if (isAutoDefaultsDisabled()) {
656
- return unchanged;
657
- }
658
- if (hasCompetingSemanticConfiguration(settings)) {
659
- return unchanged;
660
- }
661
- const needs = resolveSemanticDefaultNeeds(settings);
662
- if (!needsAnySemanticDefault(needs)) {
663
- return unchanged;
664
- }
665
- if (needs.model && !isOllamaInstalled()) {
666
- return unchanged;
667
- }
668
- const nextSettings = structuredClone(settings);
669
- const resolvedModel = resolveAutoOllamaModel(nextSettings);
670
- applyOllamaProviderDefaults(nextSettings, needs, resolvedModel);
671
- applyVectorStoreDefaults(nextSettings, needs);
672
- applySearchEmbeddingDefaults(nextSettings, needs, resolvedModel);
673
- return {
674
- settings: nextSettings,
675
- auto_ollama_defaults_applied: true
676
- };
677
- }
678
-
679
- // dist/core/search/vector-stores.js
680
- import { mkdir, readFile, stat, unlink } from "node:fs/promises";
681
- import { dirname, join, resolve } from "node:path";
682
- var DEFAULT_COLLECTION = "pm_items";
683
- var COLLECTION_SANITIZE_PATTERN = /[^a-zA-Z0-9_-]/g;
684
- var MAX_COLLECTION_NAME_LENGTH = 128;
685
- var LANCE_DB_LOCAL_SNAPSHOT_DIR = ".pm-cli-local-vectors";
686
- var LANCE_DB_LOCAL_SNAPSHOT_VERSION = 1;
687
- var lanceDbLocalTables = /* @__PURE__ */ new Map();
688
- function resolveStoreCollectionName(store) {
689
- const candidate = toNonEmptyString(store.collection_name) ?? DEFAULT_COLLECTION;
690
- return candidate.replaceAll(COLLECTION_SANITIZE_PATTERN, "_").slice(0, MAX_COLLECTION_NAME_LENGTH);
691
- }
692
- function normalizeVector(value) {
693
- if (!isFiniteNumberArray(value) || value.length === 0) {
694
- throw new Error("Vector values must be a non-empty numeric array");
695
- }
696
- return [...value];
697
- }
698
- function normalizeLimit(value) {
699
- if (!Number.isFinite(value) || value <= 0) {
700
- throw new Error("Vector query limit must be a positive number");
701
- }
702
- return Math.floor(value);
703
- }
704
- function normalizeQdrantQueryResponse(payload) {
705
- const result = payload.result;
706
- if (!Array.isArray(result)) {
707
- throw new TypeError("Qdrant query response must include a result array");
708
- }
709
- const hits = result.map((entry, index) => {
710
- const idValue = entry.id;
711
- const idCandidate = typeof idValue === "number" ? String(idValue) : idValue;
712
- const id = toNonEmptyString(idCandidate);
713
- if (!id) {
714
- throw new Error(`Qdrant query response entry at index ${index} is missing a non-empty id`);
715
- }
716
- const score = entry.score;
717
- if (typeof score !== "number" || !Number.isFinite(score)) {
718
- throw new TypeError(`Qdrant query response entry at index ${index} is missing a finite numeric score`);
719
- }
720
- const payloadValue = entry.payload;
721
- if (payloadValue !== void 0 && (typeof payloadValue !== "object" || payloadValue === null || Array.isArray(payloadValue))) {
722
- throw new Error(`Qdrant query response entry at index ${index} must provide payload as an object when set`);
723
- }
724
- return {
725
- id,
726
- score,
727
- ...payloadValue ? { payload: payloadValue } : {}
728
- };
729
- });
730
- hits.sort((left, right) => {
731
- if (left.score !== right.score) {
732
- return right.score - left.score;
733
- }
734
- return left.id.localeCompare(right.id);
735
- });
736
- return hits;
737
- }
738
- function normalizeQdrantUpsertResponse(payload) {
739
- const nestedStatus = toNonEmptyString(payload.result?.status);
740
- if (nestedStatus) {
741
- return { status: nestedStatus };
742
- }
743
- const topLevelStatus = toNonEmptyString(payload.status);
744
- if (topLevelStatus) {
745
- return { status: topLevelStatus };
746
- }
747
- throw new Error("Qdrant upsert response must include status metadata");
748
- }
749
- async function executeRemoteVectorPlan(endpoint, plan, timeoutMs, fetcher, requestKind) {
750
- return await executeSearchJsonRequest({
751
- endpoint,
752
- method: plan.method,
753
- headers: plan.headers,
754
- body: plan.body,
755
- timeoutMs,
756
- fetcher,
757
- requestLabel: `Vector ${requestKind} request`,
758
- responseLabel: `Vector ${requestKind} response`
759
- });
760
- }
761
- function resolveQdrantStore(settings) {
762
- const url = toNonEmptyString(settings.vector_store?.qdrant?.url);
763
- if (!url) {
764
- return null;
765
- }
766
- const collectionName = toNonEmptyString(settings.vector_store?.collection_name);
767
- const apiKey = toNonEmptyString(settings.vector_store?.qdrant?.api_key);
768
- return {
769
- name: "qdrant",
770
- url,
771
- ...collectionName && collectionName !== DEFAULT_COLLECTION ? { collection_name: collectionName } : {},
772
- ...apiKey ? { api_key: apiKey } : {}
773
- };
774
- }
775
- function resolveLanceDbStore(settings) {
776
- const lancedbPath = toNonEmptyString(settings.vector_store?.lancedb?.path);
777
- if (!lancedbPath) {
778
- return null;
779
- }
780
- const collectionName = toNonEmptyString(settings.vector_store?.collection_name);
781
- return {
782
- name: "lancedb",
783
- path: lancedbPath,
784
- ...collectionName && collectionName !== DEFAULT_COLLECTION ? { collection_name: collectionName } : {}
785
- };
786
- }
787
- function normalizeVectorRecords(records) {
788
- if (!Array.isArray(records) || records.length === 0) {
789
- throw new Error("Vector upsert records must include at least one entry");
790
- }
791
- return records.map((record, index) => {
792
- const id = toNonEmptyString(record.id);
793
- if (!id) {
794
- throw new Error(`Vector upsert record at index ${index} is missing a non-empty id`);
795
- }
796
- const vector = normalizeVector(record.vector);
797
- const payload = record.payload;
798
- if (payload !== void 0 && (typeof payload !== "object" || payload === null || Array.isArray(payload))) {
799
- throw new Error(`Vector upsert record at index ${index} must provide payload as an object when set`);
800
- }
801
- return {
802
- id,
803
- vector,
804
- ...payload ? { payload } : {}
805
- };
806
- });
807
- }
808
- function normalizeVectorDeleteIds(ids) {
809
- if (!Array.isArray(ids) || ids.length === 0) {
810
- throw new Error("Vector delete ids must include at least one entry");
811
- }
812
- const normalizedIds = ids.map((id, index) => {
813
- const normalized = toNonEmptyString(id);
814
- if (!normalized) {
815
- throw new Error(`Vector delete id at index ${index} is missing a non-empty value`);
816
- }
817
- return normalized;
818
- }).sort((left, right) => left.localeCompare(right));
819
- const uniqueIds = [];
820
- for (const id of normalizedIds) {
821
- if (uniqueIds.at(-1) !== id) {
822
- uniqueIds.push(id);
823
- }
824
- }
825
- return uniqueIds;
826
- }
827
- function resolveQdrantDeleteTarget(upsertTarget) {
828
- return upsertTarget.replace(/\/points\?wait=true$/, "/points/delete?wait=true");
829
- }
830
- function resolveQdrantCollectionTarget(upsertTarget) {
831
- return upsertTarget.replace(/\/points\?wait=true$/, "");
832
- }
833
- function buildQdrantJsonHeaders(store) {
834
- return {
835
- "content-type": "application/json",
836
- ...store.api_key ? { "api-key": store.api_key } : {}
837
- };
838
- }
839
- function getLanceDbLocalTableKey(storePath, table) {
840
- return getLanceDbSnapshotPath(storePath, table);
841
- }
842
- function getLanceDbSnapshotPath(storePath, table) {
843
- return join(resolve(storePath), LANCE_DB_LOCAL_SNAPSHOT_DIR, `${table}.json`);
844
- }
845
- function isNodeErrorWithCode(error, code) {
846
- return typeof error === "object" && error !== null && error.code === code;
847
- }
848
- function normalizeSnapshotRecord(entry, index, snapshotPath) {
849
- const id = toNonEmptyString(entry.id);
850
- if (!id) {
851
- throw new Error(`LanceDB local snapshot '${snapshotPath}' record at index ${index} is missing a non-empty id`);
852
- }
853
- const vector = normalizeVector(entry.vector);
854
- const payload = entry.payload;
855
- if (payload !== void 0 && (typeof payload !== "object" || payload === null || Array.isArray(payload))) {
856
- throw new Error(`LanceDB local snapshot '${snapshotPath}' record '${id}' must provide payload as an object when set`);
857
- }
858
- return {
859
- id,
860
- vector,
861
- ...payload ? { payload } : {}
862
- };
863
- }
864
- function parseLanceDbSnapshot(snapshotPath, expectedTable, raw) {
865
- let parsed;
866
- try {
867
- parsed = JSON.parse(raw);
868
- } catch (error) {
869
- throw new Error(`LanceDB local snapshot at '${snapshotPath}' is not valid JSON: ${toErrorMessage(error)}`);
870
- }
871
- if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
872
- throw new Error(`LanceDB local snapshot at '${snapshotPath}' must be a JSON object`);
873
- }
874
- const version = parsed.version;
875
- if (version !== LANCE_DB_LOCAL_SNAPSHOT_VERSION) {
876
- throw new Error(`LanceDB local snapshot at '${snapshotPath}' must include version=${LANCE_DB_LOCAL_SNAPSHOT_VERSION}`);
877
- }
878
- const table = toNonEmptyString(parsed.table);
879
- if (!table) {
880
- throw new Error(`LanceDB local snapshot at '${snapshotPath}' must include a non-empty table value`);
881
- }
882
- if (table !== expectedTable) {
883
- throw new Error(`LanceDB local snapshot at '${snapshotPath}' table mismatch: expected '${expectedTable}', received '${table}'`);
884
- }
885
- const recordsValue = parsed.records;
886
- if (!Array.isArray(recordsValue)) {
887
- throw new TypeError(`LanceDB local snapshot at '${snapshotPath}' must include a records array`);
888
- }
889
- const tableRecords = /* @__PURE__ */ new Map();
890
- for (let index = 0; index < recordsValue.length; index += 1) {
891
- const record = normalizeSnapshotRecord(recordsValue[index], index, snapshotPath);
892
- tableRecords.set(record.id, record);
893
- }
894
- return tableRecords;
895
- }
896
- async function readLanceDbSnapshotStats(snapshotPath) {
897
- try {
898
- const stats = await stat(snapshotPath);
899
- return { mtimeMs: stats.mtimeMs, size: stats.size };
900
- } catch (error) {
901
- if (!isNodeErrorWithCode(error, "ENOENT")) {
902
- throw error;
903
- }
904
- return null;
905
- }
906
- }
907
- function resolveMissingLanceDbSnapshotCache(key, cached) {
908
- if (!cached) {
909
- return null;
910
- }
911
- if (cached.mtimeMs === null && cached.size === null && cached.records.size === 0) {
912
- return cached.records;
913
- }
914
- const loaded = /* @__PURE__ */ new Map();
915
- lanceDbLocalTables.set(key, { records: loaded, mtimeMs: null, size: null });
916
- return loaded;
917
- }
918
- function cachedLanceDbSnapshotMatches(cached, snapshotStats) {
919
- return cached !== void 0 && snapshotStats !== null && cached.mtimeMs === snapshotStats.mtimeMs && cached.size === snapshotStats.size;
920
- }
921
- async function loadLanceDbLocalTable(storePath, table) {
922
- const key = getLanceDbLocalTableKey(storePath, table);
923
- const snapshotPath = getLanceDbSnapshotPath(storePath, table);
924
- const snapshotStats = await readLanceDbSnapshotStats(snapshotPath);
925
- const cached = lanceDbLocalTables.get(key);
926
- if (!snapshotStats) {
927
- const resolved = resolveMissingLanceDbSnapshotCache(key, cached);
928
- if (resolved) {
929
- return resolved;
930
- }
931
- }
932
- if (cachedLanceDbSnapshotMatches(cached, snapshotStats)) {
933
- return cached.records;
934
- }
935
- let loaded = /* @__PURE__ */ new Map();
936
- try {
937
- const raw = await readFile(snapshotPath, "utf8");
938
- loaded = parseLanceDbSnapshot(snapshotPath, table, raw);
939
- } catch (error) {
940
- if (!isNodeErrorWithCode(error, "ENOENT")) {
941
- throw error;
942
- }
943
- }
944
- lanceDbLocalTables.set(key, {
945
- records: loaded,
946
- mtimeMs: snapshotStats?.mtimeMs ?? null,
947
- size: snapshotStats?.size ?? null
948
- });
949
- return loaded;
950
- }
951
- function buildSnapshotRecords(table) {
952
- const records = [...table.values()];
953
- records.sort((left, right) => left.id.localeCompare(right.id));
954
- return records.map((record) => ({
955
- id: record.id,
956
- vector: [...record.vector],
957
- ...record.payload ? { payload: record.payload } : {}
958
- }));
959
- }
960
- async function removeSnapshotFile(snapshotPath) {
961
- try {
962
- await unlink(snapshotPath);
963
- } catch (error) {
964
- if (!isNodeErrorWithCode(error, "ENOENT")) {
965
- throw new Error(`LanceDB local snapshot delete failed at '${snapshotPath}': ${toErrorMessage(error)}`);
966
- }
967
- }
968
- }
969
- async function persistLanceDbLocalTable(storePath, tableName, table) {
970
- const snapshotPath = getLanceDbSnapshotPath(storePath, tableName);
971
- if (table.size === 0) {
972
- await removeSnapshotFile(snapshotPath);
973
- return;
974
- }
975
- const snapshotDir = dirname(snapshotPath);
976
- try {
977
- await mkdir(snapshotDir, { recursive: true });
978
- } catch (error) {
979
- throw new Error(`LanceDB local snapshot directory create failed at '${snapshotDir}': ${toErrorMessage(error)}`);
980
- }
981
- const serialized = `${JSON.stringify({
982
- version: LANCE_DB_LOCAL_SNAPSHOT_VERSION,
983
- table: tableName,
984
- records: buildSnapshotRecords(table)
985
- })}
986
- `;
987
- try {
988
- await writeFileAtomic(snapshotPath, serialized);
989
- } catch (error) {
990
- throw new Error(`LanceDB local snapshot write failed at '${snapshotPath}': ${toErrorMessage(error)}`);
991
- }
992
- }
993
- async function resetLanceDbLocalTable(storePath, tableName) {
994
- const key = getLanceDbLocalTableKey(storePath, tableName);
995
- const snapshotPath = getLanceDbSnapshotPath(storePath, tableName);
996
- await removeSnapshotFile(snapshotPath);
997
- lanceDbLocalTables.delete(key);
998
- }
999
- function l2Norm(vector) {
1000
- let sumSq = 0;
1001
- for (let index = 0; index < vector.length; index += 1) {
1002
- sumSq += vector[index] * vector[index];
1003
- }
1004
- return Math.sqrt(sumSq);
1005
- }
1006
- function cosineSimilarity(left, right) {
1007
- let dotProd = 0;
1008
- for (let index = 0; index < left.length; index += 1) {
1009
- dotProd += left[index] * right[index];
1010
- }
1011
- const leftNorm = l2Norm(left);
1012
- const rightNorm = l2Norm(right);
1013
- if (leftNorm === 0 || rightNorm === 0) {
1014
- return 0;
1015
- }
1016
- return dotProd / (leftNorm * rightNorm);
1017
- }
1018
- function resolveVectorStores(settings) {
1019
- const qdrant = resolveQdrantStore(settings);
1020
- const lancedb = resolveLanceDbStore(settings);
1021
- const available = [qdrant, lancedb].filter((entry) => entry !== null);
1022
- const preferredName = toNonEmptyString(settings.vector_store?.adapter);
1023
- const preferredKey = preferredName ? preferredName.toLowerCase() : null;
1024
- const preferred = preferredKey ? available.find((entry) => entry.name === preferredKey) : void 0;
1025
- return {
1026
- active: preferred ?? available[0] ?? null,
1027
- available
1028
- };
1029
- }
1030
- function resolveVectorStoreRequestTarget(store) {
1031
- const collectionName = resolveStoreCollectionName(store);
1032
- if (store.name === "qdrant") {
1033
- const baseUrl = trimTrailingSlashes(store.url);
1034
- const encodedCollection2 = encodeURIComponent(collectionName);
1035
- return {
1036
- store: "qdrant",
1037
- query_target: `${baseUrl}/collections/${encodedCollection2}/points/search`,
1038
- upsert_target: `${baseUrl}/collections/${encodedCollection2}/points?wait=true`
1039
- };
1040
- }
1041
- const encodedPath = encodeURIComponent(store.path);
1042
- const encodedCollection = encodeURIComponent(collectionName);
1043
- return {
1044
- store: "lancedb",
1045
- query_target: `lancedb://${encodedPath}#${encodedCollection}`,
1046
- upsert_target: `lancedb://${encodedPath}#${encodedCollection}`
1047
- };
1048
- }
1049
- function buildVectorQueryPlan(store, vector, limit) {
1050
- const target = resolveVectorStoreRequestTarget(store);
1051
- const normalizedVector = normalizeVector(vector);
1052
- const normalizedLimit = normalizeLimit(limit);
1053
- if (store.name === "qdrant") {
1054
- return {
1055
- target,
1056
- method: "POST",
1057
- headers: buildQdrantJsonHeaders(store),
1058
- body: {
1059
- vector: normalizedVector,
1060
- limit: normalizedLimit,
1061
- with_payload: true
1062
- }
1063
- };
1064
- }
1065
- return {
1066
- target,
1067
- method: "LOCAL",
1068
- headers: {},
1069
- body: {
1070
- table: resolveStoreCollectionName(store),
1071
- vector: normalizedVector,
1072
- limit: normalizedLimit
1073
- }
1074
- };
1075
- }
1076
- function buildVectorUpsertPlan(store, records) {
1077
- const target = resolveVectorStoreRequestTarget(store);
1078
- const normalizedRecords = normalizeVectorRecords(records);
1079
- if (store.name === "qdrant") {
1080
- return {
1081
- target,
1082
- method: "POST",
1083
- headers: buildQdrantJsonHeaders(store),
1084
- body: {
1085
- points: normalizedRecords
1086
- }
1087
- };
1088
- }
1089
- return {
1090
- target,
1091
- method: "LOCAL",
1092
- headers: {},
1093
- body: {
1094
- table: resolveStoreCollectionName(store),
1095
- records: normalizedRecords
1096
- }
1097
- };
1098
- }
1099
- function buildVectorDeletePlan(store, ids) {
1100
- const target = resolveVectorStoreRequestTarget(store);
1101
- const normalizedIds = normalizeVectorDeleteIds(ids);
1102
- if (store.name === "qdrant") {
1103
- return {
1104
- target,
1105
- method: "POST",
1106
- headers: buildQdrantJsonHeaders(store),
1107
- body: {
1108
- points: normalizedIds
1109
- }
1110
- };
1111
- }
1112
- return {
1113
- target,
1114
- method: "LOCAL",
1115
- headers: {},
1116
- body: {
1117
- table: resolveStoreCollectionName(store),
1118
- ids: normalizedIds
1119
- }
1120
- };
1121
- }
1122
- async function executeVectorQuery(store, vector, limit, options = {}) {
1123
- const plan = buildVectorQueryPlan(store, vector, limit);
1124
- if (plan.method === "LOCAL") {
1125
- const lanceDbStore = store;
1126
- const queryBody = plan.body;
1127
- const table = await loadLanceDbLocalTable(lanceDbStore.path, queryBody.table);
1128
- if (table.size === 0) {
1129
- return [];
1130
- }
1131
- const queryVector = normalizeVector(queryBody.vector);
1132
- const queryLimit = normalizeLimit(queryBody.limit);
1133
- const hits = [];
1134
- let dimensionMismatchCount = 0;
1135
- for (const record of table.values()) {
1136
- if (record.vector.length !== queryVector.length) {
1137
- dimensionMismatchCount++;
1138
- continue;
1139
- }
1140
- hits.push({
1141
- id: record.id,
1142
- score: cosineSimilarity(queryVector, record.vector),
1143
- ...record.payload ? { payload: record.payload } : {}
1144
- });
1145
- }
1146
- if (dimensionMismatchCount > 0 && options.warnings) {
1147
- options.warnings.push(`vector_dimension_mismatch:${dimensionMismatchCount} records skipped (expected ${queryVector.length} dimensions)`);
1148
- }
1149
- hits.sort((left, right) => {
1150
- if (left.score !== right.score) {
1151
- return right.score - left.score;
1152
- }
1153
- return left.id.localeCompare(right.id);
1154
- });
1155
- return hits.slice(0, queryLimit);
1156
- }
1157
- const timeoutMs = normalizeSearchHttpTimeoutMs(options.timeout_ms, "Vector request");
1158
- const fetcher = resolveSearchHttpFetcher(options.fetcher, "Vector request");
1159
- const payload = await executeRemoteVectorPlan(plan.target.query_target, {
1160
- method: "POST",
1161
- headers: plan.headers,
1162
- body: plan.body
1163
- }, timeoutMs, fetcher, "query");
1164
- return normalizeQdrantQueryResponse(payload);
1165
- }
1166
- async function executeVectorUpsert(store, records, options = {}) {
1167
- const plan = buildVectorUpsertPlan(store, records);
1168
- if (plan.method === "LOCAL") {
1169
- const lanceDbStore = store;
1170
- const upsertBody = plan.body;
1171
- const key = getLanceDbLocalTableKey(lanceDbStore.path, upsertBody.table);
1172
- const table = await loadLanceDbLocalTable(lanceDbStore.path, upsertBody.table);
1173
- for (const record of upsertBody.records) {
1174
- table.set(record.id, record);
1175
- }
1176
- await persistLanceDbLocalTable(lanceDbStore.path, upsertBody.table, table);
1177
- const snapshotPath = getLanceDbSnapshotPath(lanceDbStore.path, upsertBody.table);
1178
- const snapshotStats = await stat(snapshotPath);
1179
- lanceDbLocalTables.set(key, {
1180
- records: table,
1181
- mtimeMs: snapshotStats.mtimeMs,
1182
- size: snapshotStats.size
1183
- });
1184
- return { status: "ok" };
1185
- }
1186
- const timeoutMs = normalizeSearchHttpTimeoutMs(options.timeout_ms, "Vector request");
1187
- const fetcher = resolveSearchHttpFetcher(options.fetcher, "Vector request");
1188
- const payload = await executeRemoteVectorPlan(plan.target.upsert_target, {
1189
- method: "POST",
1190
- headers: plan.headers,
1191
- body: plan.body
1192
- }, timeoutMs, fetcher, "upsert");
1193
- return normalizeQdrantUpsertResponse(payload);
1194
- }
1195
- async function executeVectorDelete(store, ids, options = {}) {
1196
- const plan = buildVectorDeletePlan(store, ids);
1197
- if (plan.method === "LOCAL") {
1198
- const lanceDbStore = store;
1199
- const deleteBody = plan.body;
1200
- const key = getLanceDbLocalTableKey(lanceDbStore.path, deleteBody.table);
1201
- const table = await loadLanceDbLocalTable(lanceDbStore.path, deleteBody.table);
1202
- if (table.size === 0) {
1203
- return { status: "ok" };
1204
- }
1205
- for (const id of deleteBody.ids) {
1206
- table.delete(id);
1207
- }
1208
- await persistLanceDbLocalTable(lanceDbStore.path, deleteBody.table, table);
1209
- if (table.size === 0) {
1210
- lanceDbLocalTables.delete(key);
1211
- } else {
1212
- const snapshotPath = getLanceDbSnapshotPath(lanceDbStore.path, deleteBody.table);
1213
- const snapshotStats = await stat(snapshotPath);
1214
- lanceDbLocalTables.set(key, {
1215
- records: table,
1216
- mtimeMs: snapshotStats.mtimeMs,
1217
- size: snapshotStats.size
1218
- });
1219
- }
1220
- return { status: "ok" };
1221
- }
1222
- const timeoutMs = normalizeSearchHttpTimeoutMs(options.timeout_ms, "Vector request");
1223
- const fetcher = resolveSearchHttpFetcher(options.fetcher, "Vector request");
1224
- const payload = await executeRemoteVectorPlan(resolveQdrantDeleteTarget(plan.target.upsert_target), {
1225
- method: "POST",
1226
- headers: plan.headers,
1227
- body: plan.body
1228
- }, timeoutMs, fetcher, "delete");
1229
- return normalizeQdrantUpsertResponse(payload);
1230
- }
1231
- async function executeVectorReset(store, knownIds = [], options = {}, vectorDimension) {
1232
- if (store.name === "lancedb") {
1233
- await resetLanceDbLocalTable(store.path, resolveStoreCollectionName(store));
1234
- return { status: "ok" };
1235
- }
1236
- if (vectorDimension !== void 0) {
1237
- if (!Number.isInteger(vectorDimension) || vectorDimension <= 0) {
1238
- throw new Error("Vector reset dimension must be a positive integer when provided");
1239
- }
1240
- const target = resolveVectorStoreRequestTarget(store);
1241
- const collectionTarget = resolveQdrantCollectionTarget(target.upsert_target);
1242
- const timeoutMs = normalizeSearchHttpTimeoutMs(options.timeout_ms, "Vector request");
1243
- const fetcher = resolveSearchHttpFetcher(options.fetcher, "Vector request");
1244
- const headers = buildQdrantJsonHeaders(store);
1245
- try {
1246
- await executeRemoteVectorPlan(collectionTarget, {
1247
- method: "DELETE",
1248
- headers,
1249
- body: {}
1250
- }, timeoutMs, fetcher, "delete");
1251
- } catch (error) {
1252
- if (!toErrorMessage(error).includes("failed with status 404")) {
1253
- throw error;
1254
- }
1255
- }
1256
- const payload = await executeRemoteVectorPlan(collectionTarget, {
1257
- method: "PUT",
1258
- headers,
1259
- body: {
1260
- vectors: {
1261
- size: vectorDimension,
1262
- distance: "Cosine"
1263
- }
1264
- }
1265
- }, timeoutMs, fetcher, "upsert");
1266
- return normalizeQdrantUpsertResponse(payload);
1267
- }
1268
- const idsToDelete = knownIds.map((id) => id.trim()).filter((id) => id.length > 0);
1269
- if (idsToDelete.length === 0) {
1270
- return { status: "ok" };
1271
- }
1272
- return await executeVectorDelete(store, idsToDelete, options);
1273
- }
1274
-
1275
- // dist/core/search/vectorization-metadata.js
1276
- function buildVectorizationEmbeddingIdentity(provider, model) {
1277
- const normalizedProvider = toNonEmptyString(provider);
1278
- const normalizedModel = toNonEmptyString(model);
1279
- if (!normalizedProvider || !normalizedModel) {
1280
- return null;
1281
- }
1282
- return {
1283
- provider: normalizedProvider,
1284
- model: normalizedModel
1285
- };
1286
- }
1287
- function normalizeVectorizationEmbeddingMetadata(value) {
1288
- if (value === void 0 || value === null) {
1289
- return null;
1290
- }
1291
- if (typeof value !== "object" || Array.isArray(value)) {
1292
- throw new Error("Vectorization embedding metadata must be an object when set");
1293
- }
1294
- const identity = buildVectorizationEmbeddingIdentity(value.provider, value.model);
1295
- const vectorDimension = value.vector_dimension;
1296
- if (!identity || typeof vectorDimension !== "number" || !Number.isInteger(vectorDimension) || vectorDimension <= 0) {
1297
- throw new Error("Vectorization embedding metadata must include provider, model, and positive vector_dimension");
1298
- }
1299
- return {
1300
- ...identity,
1301
- vector_dimension: vectorDimension
1302
- };
1303
- }
1304
- function buildVectorizationEmbeddingMetadata(identity, vectorDimension) {
1305
- if (!Number.isInteger(vectorDimension) || vectorDimension <= 0) {
1306
- throw new Error("Vectorization embedding metadata requires a positive vector dimension");
1307
- }
1308
- return {
1309
- provider: identity.provider,
1310
- model: identity.model,
1311
- vector_dimension: vectorDimension
1312
- };
1313
- }
1314
- function hasVectorizationEmbeddingIdentityChanged(metadata, identity) {
1315
- return !metadata || metadata.provider !== identity.provider || metadata.model !== identity.model;
1316
- }
1317
- function hasVectorizationVectorDimensionChanged(metadata, vectorDimension) {
1318
- return Boolean(metadata && metadata.vector_dimension !== vectorDimension);
1319
- }
1320
- function inferConsistentVectorDimension(vectors, context) {
1321
- if (vectors.length === 0) {
1322
- throw new Error(`${context} returned no vectors`);
1323
- }
1324
- const firstVector = vectors[0];
1325
- const dimension = firstVector.length;
1326
- if (!Number.isInteger(dimension) || dimension <= 0) {
1327
- throw new Error(`${context} returned an empty vector`);
1328
- }
1329
- for (let index = 1; index < vectors.length; index += 1) {
1330
- if (vectors[index]?.length !== dimension) {
1331
- throw new Error(`${context} returned mixed vector dimensions`);
1332
- }
1333
- }
1334
- return dimension;
1335
- }
1336
-
1337
- // dist/core/search/cache.js
1338
- import path2 from "node:path";
1339
-
1340
- // dist/core/search/embedding-batches.js
1341
- function resolveBatchRuntime(settings, maxInputCharacters) {
1342
- const batchSizeCandidate = settings.search.embedding_batch_size;
1343
- const timeoutMsCandidate = settings.search.embedding_timeout_ms;
1344
- const maxRetriesCandidate = settings.search.scanner_max_batch_retries;
1345
- const batchSize = Number.isFinite(batchSizeCandidate) && batchSizeCandidate > 0 ? Math.floor(batchSizeCandidate) : 1;
1346
- const timeoutMs = Number.isFinite(timeoutMsCandidate) && timeoutMsCandidate > 0 ? Math.floor(timeoutMsCandidate) : 3e4;
1347
- const maxRetries = Number.isFinite(maxRetriesCandidate) && maxRetriesCandidate >= 0 ? Math.floor(maxRetriesCandidate) : 0;
1348
- return {
1349
- batchSize,
1350
- timeoutMs,
1351
- maxRetries,
1352
- maxBatchInputCharacters: Number.POSITIVE_INFINITY,
1353
- maxInputCharacters
1354
- };
1355
- }
1356
- function createBatches(inputs, batchSize, maxBatchInputCharacters) {
1357
- const batches = [];
1358
- let currentBatch = [];
1359
- let currentCharacters = 0;
1360
- for (const input of inputs) {
1361
- const wouldExceedCount = currentBatch.length >= batchSize;
1362
- const wouldExceedCharacters = currentBatch.length > 0 && Number.isFinite(maxBatchInputCharacters) && currentCharacters + input.length > maxBatchInputCharacters;
1363
- if (wouldExceedCount || wouldExceedCharacters) {
1364
- batches.push(currentBatch);
1365
- currentBatch = [];
1366
- currentCharacters = 0;
1367
- }
1368
- currentBatch.push(input);
1369
- currentCharacters += input.length;
1370
- }
1371
- batches.push(currentBatch);
1372
- return batches;
1373
- }
1374
- function resolveProviderBatchRuntime(provider, runtime) {
1375
- if (provider.name !== "ollama") {
1376
- return runtime;
1377
- }
1378
- return {
1379
- ...runtime,
1380
- maxBatchInputCharacters: OLLAMA_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS
1381
- };
1382
- }
1383
- function truncateInputForRuntime(input, maxInputCharacters) {
1384
- if (!Number.isFinite(maxInputCharacters) || maxInputCharacters <= 0 || input.length <= maxInputCharacters) {
1385
- return input;
1386
- }
1387
- const keepLength = Math.max(0, maxInputCharacters - SEMANTIC_CORPUS_TRUNCATION_SUFFIX.length);
1388
- return `${input.slice(0, keepLength)}${SEMANTIC_CORPUS_TRUNCATION_SUFFIX}`.slice(0, maxInputCharacters);
1389
- }
1390
- function isEmbeddingTimeoutError(error) {
1391
- const message = toErrorMessage(error).toLowerCase();
1392
- return message.includes("timed out") || message.includes("timeout");
1393
- }
1394
- function buildEmbeddingFailureMessage(provider, batchLabel, batchSize, timeoutMs, attempts, error) {
1395
- const base = `Embedding batch ${batchLabel} failed after ${attempts} attempt(s): ${toErrorMessage(error)}`;
1396
- const details = `provider=${provider.name} model=${provider.model} batch_size=${batchSize} timeout_ms=${timeoutMs}`;
1397
- if (!isEmbeddingTimeoutError(error)) {
1398
- return `${base} (${details})`;
1399
- }
1400
- return `${base} (${details}; guidance=check provider availability or lower search.embedding_batch_size, raise search.embedding_timeout_ms, or run keyword search while semantic indexing catches up)`;
1401
- }
1402
- async function executeBatchWithAdaptiveSplit(provider, batch, batchLabel, timeoutMs, maxRetries, warnings) {
1403
- let lastError = null;
1404
- for (let attempt = 0; attempt <= maxRetries; attempt += 1) {
1405
- try {
1406
- const batchVectors = await executeEmbeddingRequest(provider, batch, { timeout_ms: timeoutMs });
1407
- if (attempt > 0) {
1408
- warnings.push(`search_embedding_batch_retry_succeeded:batch=${batchLabel}:attempt=${attempt + 1}:size=${batch.length}`);
1409
- }
1410
- return batchVectors;
1411
- } catch (error) {
1412
- lastError = error;
1413
- if (isEmbeddingTimeoutError(error) && batch.length > 1) {
1414
- const midpoint = Math.ceil(batch.length / 2);
1415
- const left = batch.slice(0, midpoint);
1416
- const right = batch.slice(midpoint);
1417
- warnings.push(`search_embedding_batch_split_after_timeout:batch=${batchLabel}:size=${batch.length}:parts=${left.length}|${right.length}`);
1418
- return [
1419
- ...await executeBatchWithAdaptiveSplit(provider, left, `${batchLabel}.1`, timeoutMs, maxRetries, warnings),
1420
- ...await executeBatchWithAdaptiveSplit(provider, right, `${batchLabel}.2`, timeoutMs, maxRetries, warnings)
1421
- ];
1422
- }
1423
- if (attempt < maxRetries) {
1424
- const delayMs = Math.min(1e3 * 2 ** attempt, 8e3);
1425
- await new Promise((resolve2) => setTimeout(resolve2, delayMs));
1426
- }
1427
- }
1428
- }
1429
- throw new Error(buildEmbeddingFailureMessage(provider, batchLabel, batch.length, timeoutMs, maxRetries + 1, lastError));
1430
- }
1431
- async function executeEmbeddingBatchesWithRetry(provider, settings, inputs, options = {}) {
1432
- if (inputs.length === 0) {
1433
- return {
1434
- vectors: [],
1435
- warnings: []
1436
- };
1437
- }
1438
- const warnings = [];
1439
- const corpusLimitResolution = resolveSemanticCorpusCharacterLimit(provider.name, settings.search.embedding_corpus_max_characters);
1440
- if (corpusLimitResolution.warning) {
1441
- warnings.push(corpusLimitResolution.warning);
1442
- }
1443
- const runtime = resolveProviderBatchRuntime(provider, resolveBatchRuntime(settings, corpusLimitResolution.maxCharacters));
1444
- let truncatedInputCount = 0;
1445
- const normalizedInputs = inputs.map((input) => {
1446
- const normalized = truncateInputForRuntime(input, runtime.maxInputCharacters);
1447
- if (normalized.length < input.length) {
1448
- truncatedInputCount += 1;
1449
- }
1450
- return normalized;
1451
- });
1452
- if (truncatedInputCount > 0) {
1453
- warnings.push(`search_embedding_input_truncated:count=${truncatedInputCount}:max_characters=${runtime.maxInputCharacters}`);
1454
- }
1455
- const batches = createBatches(normalizedInputs, runtime.batchSize, runtime.maxBatchInputCharacters);
1456
- const vectors = [];
1457
- let completedInputs = 0;
1458
- for (let batchIndex = 0; batchIndex < batches.length; batchIndex += 1) {
1459
- const batch = batches[batchIndex];
1460
- options.onProgress?.({
1461
- batch_index: batchIndex + 1,
1462
- batch_total: batches.length,
1463
- batch_size: batch.length,
1464
- completed_inputs: completedInputs,
1465
- total_inputs: normalizedInputs.length,
1466
- phase: "start"
1467
- });
1468
- vectors.push(...await executeBatchWithAdaptiveSplit(provider, batch, String(batchIndex + 1), runtime.timeoutMs, runtime.maxRetries, warnings));
1469
- completedInputs += batch.length;
1470
- options.onProgress?.({
1471
- batch_index: batchIndex + 1,
1472
- batch_total: batches.length,
1473
- batch_size: batch.length,
1474
- completed_inputs: completedInputs,
1475
- total_inputs: normalizedInputs.length,
1476
- phase: "complete"
1477
- });
1478
- }
1479
- return {
1480
- vectors,
1481
- warnings
1482
- };
1483
- }
1484
-
1485
- // dist/core/search/background-refresh.js
1486
- import { spawn } from "node:child_process";
1487
- import { mkdirSync, rmSync, statSync } from "node:fs";
1488
- import path from "node:path";
1489
- var REINDEX_LOCK_ID = "reindex";
1490
- var PENDING_QUEUE_REL_PATH = "search/pending-refresh.json";
1491
- var PENDING_QUEUE_GATE_REL_PATH = "search/pending-refresh.gate.lock";
1492
- var PENDING_QUEUE_GATE_STALE_MS = 3e4;
1493
- var SEARCH_REFRESH_INLINE_ENV = "PM_SEARCH_REFRESH_INLINE";
1494
- var SEARCH_REFRESH_CHILD_ENV = "PM_SEARCH_REFRESH_CHILD";
1495
- function parseBooleanTrueLike(value) {
1496
- if (typeof value !== "string") {
1497
- return false;
1498
- }
1499
- const normalized = value.trim().toLowerCase();
1500
- return normalized === "1" || normalized === "true" || normalized === "yes" || normalized === "on";
1501
- }
1502
- function shouldRunSearchRefreshInForeground() {
1503
- if (parseBooleanTrueLike(process.env[SEARCH_REFRESH_INLINE_ENV])) {
1504
- return true;
1505
- }
1506
- if (parseBooleanTrueLike(process.env[SEARCH_REFRESH_CHILD_ENV])) {
1507
- return true;
1508
- }
1509
- const nodeEnv = (process.env.NODE_ENV ?? "").trim().toLowerCase();
1510
- return typeof process.env.VITEST === "string" || typeof process.env.VITEST_WORKER_ID === "string" || nodeEnv === "test";
1511
- }
1512
- function pendingQueuePath(pmRoot) {
1513
- return path.join(pmRoot, PENDING_QUEUE_REL_PATH);
1514
- }
1515
- function pendingQueueGatePath(pmRoot) {
1516
- return path.join(pmRoot, PENDING_QUEUE_GATE_REL_PATH);
1517
- }
1518
- function acquireQueueGate(pmRoot) {
1519
- const gatePath = pendingQueueGatePath(pmRoot);
1520
- try {
1521
- if (Date.now() - statSync(gatePath).mtimeMs < PENDING_QUEUE_GATE_STALE_MS) {
1522
- return false;
1523
- }
1524
- rmSync(gatePath, { recursive: true, force: true });
1525
- } catch {
1526
- }
1527
- try {
1528
- mkdirSync(path.dirname(gatePath), { recursive: true });
1529
- mkdirSync(gatePath);
1530
- return true;
1531
- } catch {
1532
- return false;
1533
- }
1534
- }
1535
- function releaseQueueGate(pmRoot) {
1536
- try {
1537
- rmSync(pendingQueueGatePath(pmRoot), { recursive: true, force: true });
1538
- } catch {
1539
- }
1540
- }
1541
- async function withQueueGate(pmRoot, fn, fallback) {
1542
- for (let attempt = 0; attempt < 50; attempt += 1) {
1543
- if (acquireQueueGate(pmRoot)) {
1544
- try {
1545
- return await fn();
1546
- } finally {
1547
- releaseQueueGate(pmRoot);
1548
- }
1549
- }
1550
- await delay(20);
1551
- }
1552
- return fallback;
1553
- }
1554
- function delay(ms) {
1555
- return new Promise((resolve2) => {
1556
- setTimeout(resolve2, ms);
1557
- });
1558
- }
1559
- async function readPendingQueueIds(pmRoot) {
1560
- const raw = await readFileIfExists(pendingQueuePath(pmRoot));
1561
- if (!raw || raw.trim().length === 0) {
1562
- return [];
1563
- }
1564
- try {
1565
- const parsed = JSON.parse(raw);
1566
- if (!Array.isArray(parsed.ids)) {
1567
- return [];
1568
- }
1569
- return parsed.ids.filter((id) => typeof id === "string" && id.length > 0);
1570
- } catch {
1571
- return [];
1572
- }
1573
- }
1574
- async function writePendingQueueIds(pmRoot, ids) {
1575
- await writeFileAtomic(pendingQueuePath(pmRoot), `${JSON.stringify({ ids })}
1576
- `);
1577
- }
1578
- async function enqueuePendingRefreshIds(pmRoot, itemIds) {
1579
- const incoming = itemIds.filter((id) => typeof id === "string" && id.trim().length > 0);
1580
- if (incoming.length === 0) {
1581
- return;
1582
- }
1583
- const mergeIncoming = async () => {
1584
- const existing = await readPendingQueueIds(pmRoot);
1585
- const merged = [.../* @__PURE__ */ new Set([...existing, ...incoming])].sort((left, right) => left.localeCompare(right));
1586
- await writePendingQueueIds(pmRoot, merged);
1587
- };
1588
- const gated = await withQueueGate(pmRoot, async () => {
1589
- await mergeIncoming();
1590
- return true;
1591
- }, false);
1592
- if (!gated) {
1593
- await mergeIncoming();
1594
- }
1595
- }
1596
- function searchRefreshRunnerPath() {
1597
- return path.join(resolvePmPackageRootFromModule(import.meta.url, ["../../.."]), "dist", "cli", "search-refresh.js");
1598
- }
1599
- function dispatchRefreshChild(pmRoot) {
1600
- try {
1601
- const child = spawn(process.execPath, [searchRefreshRunnerPath()], {
1602
- detached: true,
1603
- stdio: "ignore",
1604
- env: {
1605
- ...process.env,
1606
- PM_PATH: pmRoot,
1607
- [SEARCH_REFRESH_CHILD_ENV]: "1"
1608
- }
1609
- });
1610
- child.on("error", () => {
1611
- });
1612
- child.unref();
1613
- } catch {
1614
- }
1615
- }
1616
- async function scheduleBackgroundSemanticRefresh(pmRoot, itemIds) {
1617
- await enqueuePendingRefreshIds(pmRoot, itemIds);
1618
- dispatchRefreshChild(pmRoot);
1619
- }
1620
-
1621
- // dist/core/search/cache.js
1622
- var SEARCH_CACHE_ARTIFACT_PATHS = ["index/manifest.json", "search/embeddings.jsonl"];
1623
- var VECTORIZATION_STATUS_LEDGER_PATH = "search/vectorization-status.json";
1624
- function formatInvalidationWarning(relativePath, error) {
1625
- return `search_cache_invalidation_failed:${relativePath}:${String(error)}`;
1626
- }
1627
- function toUniqueSorted(values) {
1628
- return [...new Set([...values].map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
1629
- }
1630
- function isValidUpdatedAt(value) {
1631
- return typeof value === "string" && value.trim().length > 0 && Number.isFinite(Date.parse(value));
1632
- }
1633
- function normalizeVectorizationLedgerEntries(entries) {
1634
- const normalized = /* @__PURE__ */ new Map();
1635
- for (const [rawId, rawUpdatedAt] of Object.entries(entries)) {
1636
- const id = rawId.trim();
1637
- if (id.length === 0 || !isValidUpdatedAt(rawUpdatedAt)) {
1638
- continue;
1639
- }
1640
- normalized.set(id, rawUpdatedAt);
1641
- }
1642
- return Object.fromEntries([...normalized.entries()].sort((left, right) => left[0].localeCompare(right[0])));
1643
- }
1644
- async function readVectorizationStatusLedger(pmRoot) {
1645
- const ledgerPath = path2.join(pmRoot, VECTORIZATION_STATUS_LEDGER_PATH);
1646
- const raw = await readFileIfExists(ledgerPath);
1647
- if (raw === null || raw.trim().length === 0) {
1648
- return {
1649
- entries: {},
1650
- embedding: null,
1651
- warnings: []
1652
- };
1653
- }
1654
- let parsed;
1655
- try {
1656
- parsed = JSON.parse(raw);
1657
- } catch {
1658
- return {
1659
- entries: {},
1660
- embedding: null,
1661
- warnings: ["search_vectorization_status_ledger_invalid"]
1662
- };
1663
- }
1664
- if (typeof parsed !== "object" || parsed === null || parsed.version !== 1 || !Array.isArray(parsed.items)) {
1665
- return {
1666
- entries: {},
1667
- embedding: null,
1668
- warnings: ["search_vectorization_status_ledger_invalid"]
1669
- };
1670
- }
1671
- const mapped = /* @__PURE__ */ new Map();
1672
- for (const entry of parsed.items) {
1673
- if (typeof entry !== "object" || entry === null) {
1674
- return {
1675
- entries: {},
1676
- embedding: null,
1677
- warnings: ["search_vectorization_status_ledger_invalid"]
1678
- };
1679
- }
1680
- const id = entry.id;
1681
- const updatedAt = entry.updated_at;
1682
- if (typeof id !== "string" || id.trim().length === 0 || !isValidUpdatedAt(updatedAt)) {
1683
- return {
1684
- entries: {},
1685
- embedding: null,
1686
- warnings: ["search_vectorization_status_ledger_invalid"]
1687
- };
1688
- }
1689
- mapped.set(id.trim(), updatedAt);
1690
- }
1691
- let embedding = null;
1692
- try {
1693
- embedding = normalizeVectorizationEmbeddingMetadata(parsed.embedding);
1694
- } catch {
1695
- return {
1696
- entries: {},
1697
- embedding: null,
1698
- warnings: ["search_vectorization_status_ledger_invalid"]
1699
- };
1700
- }
1701
- return {
1702
- entries: Object.fromEntries([...mapped.entries()].sort((left, right) => left[0].localeCompare(right[0]))),
1703
- embedding,
1704
- warnings: []
1705
- };
1706
- }
1707
- async function writeVectorizationStatusLedger(pmRoot, entries, embedding) {
1708
- const normalizedEntries = normalizeVectorizationLedgerEntries(entries);
1709
- const ledgerPath = path2.join(pmRoot, VECTORIZATION_STATUS_LEDGER_PATH);
1710
- const serialized = `${JSON.stringify({
1711
- version: 1,
1712
- generated_at: nowIso(),
1713
- ...embedding ? { embedding } : {},
1714
- items: Object.entries(normalizedEntries).map(([id, updated_at]) => ({
1715
- id,
1716
- updated_at
1717
- }))
1718
- }, null, 2)}
1719
- `;
1720
- await writeFileAtomic(ledgerPath, serialized);
1721
- }
1722
- function buildVectorPayload(item) {
1723
- return {
1724
- id: item.id,
1725
- type: item.type,
1726
- status: item.status,
1727
- priority: item.priority,
1728
- updated_at: item.updated_at
1729
- };
1730
- }
1731
- function buildVectorizationIdentityForProvider(provider) {
1732
- const identity = buildVectorizationEmbeddingIdentity(provider.name, provider.model);
1733
- if (!identity) {
1734
- throw new Error("Embedding provider must include a provider name and model");
1735
- }
1736
- return identity;
1737
- }
1738
- function buildSkippedSemanticRefreshResult(itemIds, warning) {
1739
- return {
1740
- refreshed: [],
1741
- skipped: itemIds,
1742
- warnings: [warning]
1743
- };
1744
- }
1745
- async function resolveSemanticRefreshRuntimeContext(pmRoot, normalizedItemIds, options) {
1746
- if (!options.settings && !await pathExists(getSettingsPath(pmRoot))) {
1747
- return buildSkippedSemanticRefreshResult(normalizedItemIds, "search_semantic_refresh_skipped:settings_not_initialized");
1748
- }
1749
- let settings;
1750
- try {
1751
- settings = options.settings ?? await readSettings(pmRoot);
1752
- } catch (error) {
1753
- return buildSkippedSemanticRefreshResult(normalizedItemIds, `search_semantic_refresh_skipped:settings_read_failed:${toErrorMessage(error)}`);
1754
- }
1755
- const effectiveSettings = options.apply_runtime_defaults ? resolveSettingsWithSemanticRuntimeDefaults(settings).settings : settings;
1756
- const provider = resolveEmbeddingProviders(effectiveSettings).active;
1757
- if (!provider) {
1758
- return buildSkippedSemanticRefreshResult(normalizedItemIds, "search_semantic_refresh_skipped:provider_unconfigured");
1759
- }
1760
- const vectorStore = resolveVectorStores(effectiveSettings).active;
1761
- if (!vectorStore) {
1762
- return buildSkippedSemanticRefreshResult(normalizedItemIds, "search_semantic_refresh_skipped:vector_store_unconfigured");
1763
- }
1764
- return {
1765
- settings: effectiveSettings,
1766
- provider,
1767
- vectorStore
1768
- };
1769
- }
1770
- async function collectSemanticRefreshWorkload(pmRoot, idPrefix, preferredFormat, normalizedItemIds, typeToFolder, schema) {
1771
- const warnings = [];
1772
- const skipped = /* @__PURE__ */ new Set();
1773
- const missing = /* @__PURE__ */ new Set();
1774
- const documents = [];
1775
- for (const itemId of normalizedItemIds) {
1776
- const located = await locateItem(pmRoot, itemId, idPrefix, preferredFormat, typeToFolder);
1777
- if (!located) {
1778
- missing.add(itemId);
1779
- continue;
1780
- }
1781
- try {
1782
- const loaded = await readLocatedItem(located, { schema });
1783
- documents.push({
1784
- id: loaded.document.metadata.id,
1785
- document: loaded.document
1786
- });
1787
- } catch (error) {
1788
- skipped.add(located.id);
1789
- warnings.push(`search_semantic_refresh_item_read_failed:${located.id}:${toErrorMessage(error)}`);
1790
- }
1791
- }
1792
- documents.sort((left, right) => left.id.localeCompare(right.id));
1793
- return {
1794
- documents,
1795
- missingIds: toUniqueSorted(missing),
1796
- skippedIds: toUniqueSorted(skipped),
1797
- warnings
1798
- };
1799
- }
1800
- async function embedLocatedSemanticVectors(settings, provider, documents) {
1801
- const corpusCharacterLimit = resolveSemanticCorpusCharacterLimit(provider.name, settings.search.embedding_corpus_max_characters).maxCharacters;
1802
- const corpusFields = resolveSearchCorpusFields(settings);
1803
- const corpusInputs = documents.map((entry) => buildSemanticCorpusInput(entry.document, {
1804
- providerName: provider.name,
1805
- maxCharacters: corpusCharacterLimit,
1806
- fields: corpusFields
1807
- }));
1808
- const embeddingResult = await executeEmbeddingBatchesWithRetry(provider, settings, corpusInputs);
1809
- return {
1810
- vectors: embeddingResult.vectors,
1811
- vector_dimension: inferConsistentVectorDimension(embeddingResult.vectors, "Semantic refresh embedding"),
1812
- warnings: embeddingResult.warnings
1813
- };
1814
- }
1815
- async function upsertLocatedSemanticVectors(vectorStore, documents, vectors) {
1816
- await executeVectorUpsert(vectorStore, documents.map((entry, index) => ({
1817
- id: entry.id,
1818
- vector: vectors[index],
1819
- payload: buildVectorPayload(entry.document.metadata)
1820
- })));
1821
- return {
1822
- refreshed: documents.map((entry) => entry.id),
1823
- skipped: [],
1824
- warnings: []
1825
- };
1826
- }
1827
- async function pruneMissingSemanticVectors(vectorStore, missingIds) {
1828
- if (missingIds.length === 0) {
1829
- return { refreshed: [], skipped: [], warnings: [] };
1830
- }
1831
- try {
1832
- await executeVectorDelete(vectorStore, missingIds);
1833
- return {
1834
- refreshed: [],
1835
- skipped: [],
1836
- warnings: []
1837
- };
1838
- } catch (error) {
1839
- return {
1840
- refreshed: [],
1841
- skipped: missingIds,
1842
- warnings: [`search_semantic_refresh_delete_failed:${toErrorMessage(error)}`]
1843
- };
1844
- }
1845
- }
1846
- async function invalidateSearchCacheArtifacts(pmRoot) {
1847
- const invalidated = [];
1848
- const warnings = [];
1849
- for (const relativePath of SEARCH_CACHE_ARTIFACT_PATHS) {
1850
- const artifactPath = path2.join(pmRoot, relativePath);
1851
- try {
1852
- if (!await pathExists(artifactPath)) {
1853
- continue;
1854
- }
1855
- await removeFileIfExists(artifactPath);
1856
- invalidated.push(relativePath);
1857
- } catch (error) {
1858
- warnings.push(formatInvalidationWarning(relativePath, error));
1859
- }
1860
- }
1861
- return {
1862
- invalidated,
1863
- warnings
1864
- };
1865
- }
1866
- async function refreshSemanticEmbeddingsForMutatedItems(pmRoot, itemIds, options = {}) {
1867
- const normalizedItemIds = toUniqueSorted(itemIds);
1868
- if (normalizedItemIds.length === 0) {
1869
- return {
1870
- refreshed: [],
1871
- skipped: [],
1872
- warnings: []
1873
- };
1874
- }
1875
- const runtimeContext = await resolveSemanticRefreshRuntimeContext(pmRoot, normalizedItemIds, options);
1876
- if (!("settings" in runtimeContext)) {
1877
- return runtimeContext;
1878
- }
1879
- const typeRegistry = resolveItemTypeRegistry(runtimeContext.settings, getActiveExtensionRegistrations());
1880
- const workload = await collectSemanticRefreshWorkload(pmRoot, runtimeContext.settings.id_prefix, runtimeContext.settings.item_format, normalizedItemIds, typeRegistry.type_to_folder, runtimeContext.settings.schema);
1881
- const ledgerRead = workload.documents.length > 0 || workload.missingIds.length > 0 ? await readVectorizationStatusLedger(pmRoot) : { entries: {}, embedding: null, warnings: [] };
1882
- const embeddingIdentity = buildVectorizationIdentityForProvider(runtimeContext.provider);
1883
- const nextLedgerBaseEntries = ledgerRead.entries;
1884
- let refreshedResult = { refreshed: [], skipped: [], warnings: [] };
1885
- let nextEmbeddingMetadata = ledgerRead.embedding;
1886
- if (workload.documents.length > 0) {
1887
- if (ledgerRead.embedding && hasVectorizationEmbeddingIdentityChanged(ledgerRead.embedding, embeddingIdentity)) {
1888
- refreshedResult = {
1889
- refreshed: [],
1890
- skipped: workload.documents.map((entry) => entry.id),
1891
- warnings: ["search_semantic_refresh_requires_reindex:embedding_identity_changed"]
1892
- };
1893
- } else {
1894
- try {
1895
- const embedded = await embedLocatedSemanticVectors(runtimeContext.settings, runtimeContext.provider, workload.documents);
1896
- if (hasVectorizationVectorDimensionChanged(ledgerRead.embedding, embedded.vector_dimension)) {
1897
- refreshedResult = {
1898
- refreshed: [],
1899
- skipped: workload.documents.map((entry) => entry.id),
1900
- warnings: [...embedded.warnings, "search_semantic_refresh_requires_reindex:vector_dimension_changed"]
1901
- };
1902
- } else {
1903
- nextEmbeddingMetadata = buildVectorizationEmbeddingMetadata(embeddingIdentity, embedded.vector_dimension);
1904
- const upserted = await upsertLocatedSemanticVectors(runtimeContext.vectorStore, workload.documents, embedded.vectors);
1905
- refreshedResult = {
1906
- refreshed: upserted.refreshed,
1907
- skipped: upserted.skipped,
1908
- warnings: [...embedded.warnings, ...upserted.warnings]
1909
- };
1910
- }
1911
- } catch (error) {
1912
- refreshedResult = {
1913
- refreshed: [],
1914
- skipped: workload.documents.map((entry) => entry.id),
1915
- warnings: [`search_semantic_refresh_failed:${toErrorMessage(error)}`]
1916
- };
1917
- }
1918
- }
1919
- }
1920
- const pruneResult = await pruneMissingSemanticVectors(runtimeContext.vectorStore, workload.missingIds);
1921
- const refreshedIdSet = new Set(refreshedResult.refreshed);
1922
- const refreshedEntries = Object.fromEntries(workload.documents.filter((entry) => refreshedIdSet.has(entry.id)).map((entry) => [entry.id, entry.document.metadata.updated_at]));
1923
- const ledgerWarnings = [];
1924
- if (Object.keys(refreshedEntries).length > 0 || workload.missingIds.length > 0) {
1925
- const nextEntries = {
1926
- ...nextLedgerBaseEntries,
1927
- ...normalizeVectorizationLedgerEntries(refreshedEntries)
1928
- };
1929
- for (const missingId of workload.missingIds) {
1930
- delete nextEntries[missingId];
1931
- }
1932
- try {
1933
- await writeVectorizationStatusLedger(pmRoot, nextEntries, nextEmbeddingMetadata);
1934
- } catch (error) {
1935
- ledgerWarnings.push(`search_vectorization_status_ledger_write_failed:${toErrorMessage(error)}`);
1936
- }
1937
- ledgerWarnings.push(...ledgerRead.warnings);
1938
- }
1939
- return {
1940
- refreshed: toUniqueSorted([...refreshedResult.refreshed, ...pruneResult.refreshed]),
1941
- skipped: toUniqueSorted([...workload.skippedIds, ...refreshedResult.skipped, ...pruneResult.skipped]),
1942
- warnings: [...workload.warnings, ...refreshedResult.warnings, ...pruneResult.warnings, ...ledgerWarnings]
1943
- };
1944
- }
1945
- function isSemanticRefreshActive(settings, applyRuntimeDefaults) {
1946
- const effectiveSettings = applyRuntimeDefaults ? resolveSettingsWithSemanticRuntimeDefaults(settings).settings : settings;
1947
- return Boolean(resolveEmbeddingProviders(effectiveSettings).active && resolveVectorStores(effectiveSettings).active);
1948
- }
1949
- async function refreshSearchArtifactsForMutation(pmRoot, itemIds, options = {}) {
1950
- const invalidation = await invalidateSearchCacheArtifacts(pmRoot);
1951
- const normalizedItemIds = toUniqueSorted(itemIds);
1952
- if (normalizedItemIds.length === 0) {
1953
- return {
1954
- invalidated: invalidation.invalidated,
1955
- refreshed: [],
1956
- skipped: [],
1957
- warnings: invalidation.warnings
1958
- };
1959
- }
1960
- if (!await pathExists(getSettingsPath(pmRoot))) {
1961
- const semanticRefresh2 = await refreshSemanticEmbeddingsForMutatedItems(pmRoot, normalizedItemIds);
1962
- return {
1963
- invalidated: invalidation.invalidated,
1964
- refreshed: semanticRefresh2.refreshed,
1965
- skipped: semanticRefresh2.skipped,
1966
- warnings: [...invalidation.warnings, ...semanticRefresh2.warnings]
1967
- };
1968
- }
1969
- let settings;
1970
- try {
1971
- settings = await readSettings(pmRoot);
1972
- } catch (error) {
1973
- return {
1974
- invalidated: invalidation.invalidated,
1975
- refreshed: [],
1976
- skipped: normalizedItemIds,
1977
- warnings: [
1978
- ...invalidation.warnings,
1979
- `search_semantic_refresh_skipped:settings_read_failed:${toErrorMessage(error)}`
1980
- ]
1981
- };
1982
- }
1983
- if (settings.search.mutation_refresh_policy === "cache_only") {
1984
- return {
1985
- invalidated: invalidation.invalidated,
1986
- refreshed: [],
1987
- skipped: normalizedItemIds,
1988
- warnings: invalidation.warnings
1989
- };
1990
- }
1991
- const applyRuntimeDefaults = settings.search.mutation_refresh_policy === "semantic_auto";
1992
- if (options.background && isSemanticRefreshActive(settings, applyRuntimeDefaults)) {
1993
- await scheduleBackgroundSemanticRefresh(pmRoot, normalizedItemIds);
1994
- return {
1995
- invalidated: invalidation.invalidated,
1996
- refreshed: [],
1997
- skipped: [],
1998
- warnings: [...invalidation.warnings, "search_semantic_refresh_scheduled_background"],
1999
- scheduled: true
2000
- };
2001
- }
2002
- const semanticRefresh = await refreshSemanticEmbeddingsForMutatedItems(pmRoot, normalizedItemIds, {
2003
- settings,
2004
- apply_runtime_defaults: applyRuntimeDefaults
2005
- });
2006
- return {
2007
- invalidated: invalidation.invalidated,
2008
- refreshed: semanticRefresh.refreshed,
2009
- skipped: semanticRefresh.skipped,
2010
- warnings: [...invalidation.warnings, ...semanticRefresh.warnings]
2011
- };
2012
- }
2013
-
2014
- export {
2015
- resolveProviderConfigSource,
2016
- resolveEmbeddingProviders,
2017
- executeEmbeddingRequest,
2018
- resolveSearchCorpusFields,
2019
- buildReminderCorpus,
2020
- buildEventCorpus,
2021
- buildPlanFlatCorpus,
2022
- buildSearchCorpus,
2023
- resolveSemanticCorpusCharacterLimit,
2024
- buildSemanticCorpusInput,
2025
- executeEmbeddingBatchesWithRetry,
2026
- resolveSettingsWithSemanticRuntimeDefaults,
2027
- REINDEX_LOCK_ID,
2028
- shouldRunSearchRefreshInForeground,
2029
- resolveVectorStores,
2030
- executeVectorQuery,
2031
- executeVectorUpsert,
2032
- executeVectorDelete,
2033
- executeVectorReset,
2034
- buildVectorizationEmbeddingIdentity,
2035
- buildVectorizationEmbeddingMetadata,
2036
- hasVectorizationEmbeddingIdentityChanged,
2037
- hasVectorizationVectorDimensionChanged,
2038
- inferConsistentVectorDimension,
2039
- readVectorizationStatusLedger,
2040
- writeVectorizationStatusLedger,
2041
- refreshSemanticEmbeddingsForMutatedItems,
2042
- refreshSearchArtifactsForMutation
2043
- };
2044
- //# sourceMappingURL=chunk-7QH7DHUB.js.map
2045
-
2046
- //# debugId=c63a3843-4fe5-59f1-a28c-51139dae3ccd