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