@unbrained/pm-cli 2026.7.6 → 2026.7.7
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 +32 -0
- package/dist/cli/commands/annotation-command.d.ts +1 -0
- package/dist/cli/commands/annotation-command.js +29 -2
- package/dist/cli/commands/annotation-command.js.map +1 -1
- package/dist/cli/commands/comments.js +3 -4
- package/dist/cli/commands/comments.js.map +1 -1
- package/dist/cli/commands/extension/bundled-catalog.d.ts +3 -0
- package/dist/cli/commands/extension/bundled-catalog.js +38 -28
- package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.js +81 -18
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/health.js +9 -5
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/learnings.js +5 -3
- package/dist/cli/commands/learnings.js.map +1 -1
- package/dist/cli/commands/notes.js +5 -3
- package/dist/cli/commands/notes.js.map +1 -1
- package/dist/cli/commands/reindex.js +4 -3
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/search.js +3 -3
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/test.d.ts +9 -0
- package/dist/cli/commands/test.js +144 -105
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/extension-command-help.js +10 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/register-list-query.d.ts +1 -1
- package/dist/cli/register-list-query.js +18 -27
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-operations.d.ts +0 -8
- package/dist/cli/register-operations.js +41 -46
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +113 -13
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.d.ts +5 -1
- package/dist/cli/registration-helpers.js +14 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/append-F7WPGIQL.js +11 -0
- package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js → append-PVCTBVJG.js} +8 -9
- package/dist/cli-bundle/chunks/{chunk-EGAP5OWD.js → chunk-2APXX4TZ.js} +16 -14
- package/dist/cli-bundle/chunks/chunk-2APXX4TZ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js → chunk-2LEJGRQ7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js → chunk-2TILG6F2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js → chunk-3G6UMXT3.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-SMB7RV23.js.map → chunk-3G6UMXT3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js → chunk-3TYOW6RR.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js → chunk-3X542TEY.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js → chunk-42LXP4VO.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-B6XS3R3O.js.map → chunk-42LXP4VO.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CL36D4PC.js → chunk-43SIHQND.js} +36 -15
- package/dist/cli-bundle/chunks/chunk-43SIHQND.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js → chunk-43UQN754.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-7D7OOEYG.js.map → chunk-43UQN754.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js → chunk-43YSKY75.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-ALFPSEWO.js.map → chunk-43YSKY75.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js → chunk-4BKDAEDF.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-NO442GWJ.js.map → chunk-4BKDAEDF.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4LELACOL.js → chunk-4IQKDKGE.js} +15 -23
- package/dist/cli-bundle/chunks/{chunk-4LELACOL.js.map → chunk-4IQKDKGE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js → chunk-4MZOKTI2.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-F3K4JGFD.js.map → chunk-4MZOKTI2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js → chunk-52NS7JDP.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-D2XRLB55.js.map → chunk-52NS7JDP.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js → chunk-565WYS5W.js} +12 -16
- package/dist/cli-bundle/chunks/{chunk-IX5BXEMX.js.map → chunk-565WYS5W.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js → chunk-5FIQ4EX3.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-UH7T2DAX.js.map → chunk-5FIQ4EX3.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-DMRNBQOI.js → chunk-6G6O3OPQ.js} +256 -36
- package/dist/cli-bundle/chunks/chunk-6G6O3OPQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js → chunk-6LCJRGPD.js} +9 -13
- package/dist/cli-bundle/chunks/{chunk-G64OCSKU.js.map → chunk-6LCJRGPD.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js → chunk-6UQCNWFV.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-7WBAJSS6.js.map → chunk-6UQCNWFV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZSUS2OD3.js → chunk-6XTSYPPO.js} +1216 -387
- package/dist/cli-bundle/chunks/chunk-6XTSYPPO.js.map +7 -0
- package/dist/cli-bundle/chunks/chunk-7ML7JONU.js +5434 -0
- package/dist/cli-bundle/chunks/chunk-7ML7JONU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js → chunk-7PNQA24K.js} +30 -36
- package/dist/cli-bundle/chunks/{chunk-ZZD4J5XY.js.map → chunk-7PNQA24K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js → chunk-7VQ3JJN5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js → chunk-7Y5N34HX.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-OGWQ2IEP.js.map → chunk-7Y5N34HX.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js → chunk-AGAVEDIE.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js → chunk-AJUON7E6.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js → chunk-ARKHKYYS.js} +13 -21
- package/dist/cli-bundle/chunks/{chunk-ZJ262CED.js.map → chunk-ARKHKYYS.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-46CUF5L6.js → chunk-C5ACVMOI.js} +99 -51
- package/dist/cli-bundle/chunks/chunk-C5ACVMOI.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js → chunk-CJQM7O7R.js} +16 -20
- package/dist/cli-bundle/chunks/{chunk-LPSSSDJR.js.map → chunk-CJQM7O7R.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js → chunk-D2DCTFTL.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-GBAX2ZAQ.js.map → chunk-D2DCTFTL.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js → chunk-DDDWVPID.js} +8 -10
- package/dist/cli-bundle/chunks/{chunk-XHET7YUZ.js.map → chunk-DDDWVPID.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js → chunk-DG6BSXZ7.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-HIHMT6WS.js.map → chunk-DG6BSXZ7.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js → chunk-DR2V5OIV.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js → chunk-E3LWJUGF.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-ZGK4L4JM.js.map → chunk-E3LWJUGF.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js → chunk-E3YQFSFE.js} +6 -10
- package/dist/cli-bundle/chunks/{chunk-XUC7PI2H.js.map → chunk-E3YQFSFE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XG625QP4.js → chunk-EDO7VXSO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js → chunk-EIUBK2LT.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-MA4SM3QZ.js.map → chunk-EIUBK2LT.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js → chunk-EMXPI36L.js} +14 -20
- package/dist/cli-bundle/chunks/{chunk-YN7Y6DQZ.js.map → chunk-EMXPI36L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MLIYFOE7.js → chunk-EOUVR7JN.js} +12 -8
- package/dist/cli-bundle/chunks/chunk-EOUVR7JN.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js → chunk-EVEPHNXJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js → chunk-F6MT7KKE.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-M7JNBQAD.js.map → chunk-F6MT7KKE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js → chunk-F6YC2A6X.js} +7 -11
- package/dist/cli-bundle/chunks/{chunk-W3DSJQIO.js.map → chunk-F6YC2A6X.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-FILL6BB2.js +5514 -0
- package/dist/cli-bundle/chunks/chunk-FILL6BB2.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js → chunk-FN6SB4HU.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js +5359 -0
- package/dist/cli-bundle/chunks/chunk-GH73UOSJ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-EKFNL33R.js → chunk-GLS6VMWI.js} +37 -16
- package/dist/cli-bundle/chunks/chunk-GLS6VMWI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js → chunk-GPIDUMMN.js} +9 -11
- package/dist/cli-bundle/chunks/{chunk-HOVCGJSD.js.map → chunk-GPIDUMMN.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js → chunk-GTM5HQL4.js} +11 -15
- package/dist/cli-bundle/chunks/{chunk-SQOIV3OQ.js.map → chunk-GTM5HQL4.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-24YG75HI.js → chunk-H2SMKL2N.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-QLMX7SRD.js → chunk-HHEWQXPD.js} +6 -6
- package/dist/cli-bundle/chunks/chunk-HHEWQXPD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js → chunk-HX6QXV5P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js → chunk-I74FMIWA.js} +10 -16
- package/dist/cli-bundle/chunks/{chunk-4ZBE5GUN.js.map → chunk-I74FMIWA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js → chunk-IDIBF4E2.js} +20 -24
- package/dist/cli-bundle/chunks/{chunk-3N6RRO2Q.js.map → chunk-IDIBF4E2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js → chunk-II7R6KD4.js} +8 -7
- package/dist/cli-bundle/chunks/{chunk-6QBJLYBP.js.map → chunk-II7R6KD4.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-J2VGADNG.js +10320 -0
- package/dist/cli-bundle/chunks/chunk-J2VGADNG.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js → chunk-J7BOLHAV.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-FT3QTERD.js.map → chunk-J7BOLHAV.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js → chunk-KTGJ2CBU.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-GANUTS7W.js.map → chunk-KTGJ2CBU.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js → chunk-LCFJ7XAM.js} +22 -2
- package/dist/cli-bundle/chunks/{chunk-LK6XLOGP.js.map → chunk-LCFJ7XAM.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js → chunk-LZQU6XJG.js} +28 -34
- package/dist/cli-bundle/chunks/{chunk-3UJRFJ5R.js.map → chunk-LZQU6XJG.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js → chunk-M62RO3XK.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-L5PSPMZ4.js.map → chunk-M62RO3XK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js → chunk-MCEUKJKW.js} +12 -14
- package/dist/cli-bundle/chunks/{chunk-CFB33L7W.js.map → chunk-MCEUKJKW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TKD5VCTD.js → chunk-MHNMCDWR.js} +343 -195
- package/dist/cli-bundle/chunks/chunk-MHNMCDWR.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js → chunk-MRFWUSVA.js} +4 -6
- package/dist/cli-bundle/chunks/{chunk-O6AWCQRQ.js.map → chunk-MRFWUSVA.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js → chunk-N6ZHDLUY.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-SQYJ4HF2.js.map → chunk-N6ZHDLUY.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js → chunk-NWWL22C7.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-ZWBEPGD7.js.map → chunk-NWWL22C7.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js → chunk-P3MJJW7P.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js → chunk-PDXJXEZJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js → chunk-Q64AYQYW.js} +10 -12
- package/dist/cli-bundle/chunks/{chunk-SGMFPXKR.js.map → chunk-Q64AYQYW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js → chunk-QDABF2RB.js} +26 -34
- package/dist/cli-bundle/chunks/{chunk-EBRZZ54H.js.map → chunk-QDABF2RB.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-TULGS6X6.js → chunk-QFBSP3NI.js} +529 -46
- package/dist/cli-bundle/chunks/chunk-QFBSP3NI.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js → chunk-RB3KLPAH.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-GDDAGPWJ.js.map → chunk-RB3KLPAH.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-3VHSI5FL.js → chunk-RY7PTTUB.js} +94 -53
- package/dist/cli-bundle/chunks/chunk-RY7PTTUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-COSPOP7H.js → chunk-S547WBYG.js} +343 -195
- package/dist/cli-bundle/chunks/chunk-S547WBYG.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js → chunk-S5BNGFN5.js} +24 -32
- package/dist/cli-bundle/chunks/{chunk-NZEHECMW.js.map → chunk-S5BNGFN5.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js → chunk-S6VC2A2K.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-MVSP7WGJ.js.map → chunk-S6VC2A2K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js → chunk-SIM5JDON.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-45FYNUFJ.js.map → chunk-SIM5JDON.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VPIM42PC.js → chunk-SY75LYXR.js} +11 -7
- package/dist/cli-bundle/chunks/chunk-SY75LYXR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-K46RF36U.js → chunk-TEISGNSH.js} +7 -7
- package/dist/cli-bundle/chunks/chunk-TEISGNSH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js → chunk-TEKZOS7M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-W572BIEB.js → chunk-TGUK6XN6.js} +14 -18
- package/dist/cli-bundle/chunks/{chunk-W572BIEB.js.map → chunk-TGUK6XN6.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js → chunk-TNC6MZUD.js} +8 -12
- package/dist/cli-bundle/chunks/{chunk-E42XTBSP.js.map → chunk-TNC6MZUD.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js +10498 -0
- package/dist/cli-bundle/chunks/chunk-TZLYO4PP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-57NWPFF2.js → chunk-UO7XAZK6.js} +17 -4
- package/dist/cli-bundle/chunks/chunk-UO7XAZK6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js → chunk-V5ZWKJNY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js → chunk-VGO73OCK.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-I36Y7PCE.js.map → chunk-VGO73OCK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js → chunk-VLEA2UTQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js → chunk-W5HXHC7C.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-RCQZK2GO.js.map → chunk-W5HXHC7C.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js → chunk-WCWVEXGA.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-X47MKQXU.js +6690 -0
- package/dist/cli-bundle/chunks/chunk-X47MKQXU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js → chunk-XBX5CBRQ.js} +5 -7
- package/dist/cli-bundle/chunks/{chunk-NB7RLQFW.js.map → chunk-XBX5CBRQ.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-SCUR7K7N.js → chunk-XC3X7BQR.js} +541 -44
- package/dist/cli-bundle/chunks/chunk-XC3X7BQR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js → chunk-XHCVAZGM.js} +13 -17
- package/dist/cli-bundle/chunks/{chunk-CRVYGJUI.js.map → chunk-XHCVAZGM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js → chunk-XPMXPR7K.js} +7 -9
- package/dist/cli-bundle/chunks/{chunk-XB7KFVFI.js.map → chunk-XPMXPR7K.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js → chunk-XS2TMNXR.js} +6 -8
- package/dist/cli-bundle/chunks/{chunk-4CJFCTLM.js.map → chunk-XS2TMNXR.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js → chunk-XXIYUTLK.js} +10 -14
- package/dist/cli-bundle/chunks/{chunk-HFDADVJZ.js.map → chunk-XXIYUTLK.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-EOKXK3R3.js → chunk-XZWL7VNE.js} +1220 -398
- package/dist/cli-bundle/chunks/chunk-XZWL7VNE.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js +6624 -0
- package/dist/cli-bundle/chunks/chunk-Y5IKRUEM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js → chunk-Y7KYVCZM.js} +12 -18
- package/dist/cli-bundle/chunks/{chunk-6LLVNJXT.js.map → chunk-Y7KYVCZM.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-VIIUS6N6.js → chunk-YCVWWIKY.js} +16 -14
- package/dist/cli-bundle/chunks/chunk-YCVWWIKY.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js → chunk-YH5NBDFA.js} +22 -26
- package/dist/cli-bundle/chunks/{chunk-CFNGIXZP.js.map → chunk-YH5NBDFA.js.map} +1 -1
- package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js +5509 -0
- package/dist/cli-bundle/chunks/chunk-YNCFP5AR.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js → chunk-YPD7SQ5P.js} +7 -6
- package/dist/cli-bundle/chunks/{chunk-NC33K5ZS.js.map → chunk-YPD7SQ5P.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js → chunk-YPMZMKN7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js → chunk-YTD5GICJ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js → chunk-ZNEG2UDO.js} +261 -34
- package/dist/cli-bundle/chunks/{chunk-W6DYWXPQ.js.map → chunk-ZNEG2UDO.js.map} +4 -4
- package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js → chunk-ZO7CLOY2.js} +3 -3
- package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js → close-3YYQ5OG2.js} +5 -9
- package/dist/cli-bundle/chunks/close-Z3Q4U7TS.js +12 -0
- package/dist/cli-bundle/chunks/close-many-3L2RXH3M.js +22 -0
- package/dist/cli-bundle/chunks/close-many-D366FTIG.js +26 -0
- package/dist/cli-bundle/chunks/comments-54XDJNFE.js +17 -0
- package/dist/cli-bundle/chunks/comments-HGHC2PN6.js +13 -0
- package/dist/cli-bundle/chunks/{copy-32ROBIDL.js → copy-44RT5GDW.js} +4 -8
- package/dist/cli-bundle/chunks/copy-UGMUGHZA.js +9 -0
- package/dist/cli-bundle/chunks/{create-E77SDCUP.js → create-4GWJWPXG.js} +9 -14
- package/dist/cli-bundle/chunks/create-AZXCUYKP.js +25 -0
- package/dist/cli-bundle/chunks/delete-Y6SXIQ4X.js +10 -0
- package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js → delete-YQ2VPXNF.js} +4 -8
- package/dist/cli-bundle/chunks/{deps-32SU7HO5.js → deps-BU5EBJDU.js} +4 -8
- package/dist/cli-bundle/chunks/deps-FMANWFRP.js +13 -0
- package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js → docs-OQBSJNIA.js} +6 -10
- package/dist/cli-bundle/chunks/docs-VNPBZXEL.js +14 -0
- package/dist/cli-bundle/chunks/files-72HZEBOE.js +18 -0
- package/dist/cli-bundle/chunks/{files-PYKR2UUG.js → files-HTSB2KJG.js} +6 -10
- package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js → focus-FOG4ALC2.js} +7 -9
- package/dist/cli-bundle/chunks/focus-SUTMKXGX.js +10 -0
- package/dist/cli-bundle/chunks/{history-compact-3MNXLKAT.js → history-compact-M6IFAMBP.js} +9 -13
- package/dist/cli-bundle/chunks/history-compact-NEXRPP2O.js +21 -0
- package/dist/cli-bundle/chunks/{history-redact-P6DYF55G.js → history-redact-NQX3OGZP.js} +7 -11
- package/dist/cli-bundle/chunks/history-redact-WQJBZ3PX.js +17 -0
- package/dist/cli-bundle/chunks/history-repair-CBHMHAJO.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-ZJQFMWPD.js → history-repair-NHOJG7WO.js} +9 -13
- package/dist/cli-bundle/chunks/learnings-M64NTSOR.js +13 -0
- package/dist/cli-bundle/chunks/{append-BGML6VLD.js → learnings-T63JGKKN.js} +9 -11
- package/dist/cli-bundle/chunks/notes-73WE2UV2.js +13 -0
- package/dist/cli-bundle/chunks/notes-U7L6HQQ2.js +17 -0
- package/dist/cli-bundle/chunks/plan-OSCNYFGC.js +24 -0
- package/dist/cli-bundle/chunks/{plan-CHVE7PBR.js → plan-TN537L24.js} +10 -15
- package/dist/cli-bundle/chunks/{profile-ZXGSKBJD.js → profile-MHAMXMHQ.js} +9 -13
- package/dist/cli-bundle/chunks/{profile-LD23PSI6.js → profile-TIGLAKJ7.js} +9 -13
- package/dist/cli-bundle/chunks/{register-list-query-OEYQHFXO.js → register-list-query-OHXD7G5N.js} +41 -33
- package/dist/cli-bundle/chunks/register-list-query-OHXD7G5N.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-list-query-B42JCCOI.js → register-list-query-ZCRABAPN.js} +42 -34
- package/dist/cli-bundle/chunks/register-list-query-ZCRABAPN.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js → register-mutation-P3G4XP6Q.js} +36 -41
- package/dist/cli-bundle/chunks/{register-mutation-IAEST26S.js.map → register-mutation-P3G4XP6Q.js.map} +1 -1
- package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js → register-mutation-XX4H56PE.js} +34 -39
- package/dist/cli-bundle/chunks/{register-mutation-3QXIHCQG.js.map → register-mutation-XX4H56PE.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-5BMM6XQY.js → register-operations-V6PIYEDU.js} +79 -46
- package/dist/cli-bundle/chunks/register-operations-V6PIYEDU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-Z3U3U5KD.js → register-operations-V6VKTG54.js} +78 -45
- package/dist/cli-bundle/chunks/register-operations-V6VKTG54.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-3ZVVX2VN.js → register-setup-6RVAWT6W.js} +129 -29
- package/dist/cli-bundle/chunks/register-setup-6RVAWT6W.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-Q6KFNIOZ.js → register-setup-6YVUSQYD.js} +130 -30
- package/dist/cli-bundle/chunks/register-setup-6YVUSQYD.js.map +1 -0
- package/dist/cli-bundle/chunks/{restore-5RQHAPMA.js → restore-HC3YSWF7.js} +7 -11
- package/dist/cli-bundle/chunks/restore-LFAMMRYZ.js +15 -0
- package/dist/cli-bundle/chunks/{schema-HBORFC6B.js → schema-DAGSYO6E.js} +6 -10
- package/dist/cli-bundle/chunks/{schema-245WW4G2.js → schema-UBXJCQAC.js} +6 -10
- package/dist/cli-bundle/chunks/update-CJGG5WMV.js +21 -0
- package/dist/cli-bundle/chunks/update-LKD64AFP.js +25 -0
- package/dist/cli-bundle/chunks/update-many-G4SM7BHC.js +31 -0
- package/dist/cli-bundle/chunks/update-many-VLIV3D7R.js +35 -0
- package/dist/cli-bundle/main.js +29 -31
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/cli-bundle/sdk-runtime.js +129 -107
- package/dist/cli-bundle/sdk-testing.js +7 -8
- package/dist/cli-bundle/sdk.js +122 -117
- package/dist/cli-bundle/sdk.js.map +2 -2
- package/dist/core/history/drift-scan.js +3 -8
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/output/mutation-projection.js +11 -5
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/search/cache.js +3 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/semantic-defaults.d.ts +2 -0
- package/dist/core/search/semantic-defaults.js +11 -4
- package/dist/core/search/semantic-defaults.js.map +1 -1
- package/dist/core/search/vector-stores.d.ts +1 -1
- package/dist/core/search/vector-stores.js +33 -7
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +7 -7
- package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +9 -7
- package/dist/sdk/cli-contracts/tool-schema.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +151 -8
- package/dist/sdk/runtime.js +255 -14
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/sdk/start-task-status.d.ts +13 -0
- package/dist/sdk/start-task-status.js +19 -0
- package/dist/sdk/start-task-status.js.map +1 -0
- package/docs/COMMANDS.md +10 -1
- package/docs/SDK.md +35 -0
- package/docs/TESTING.md +3 -0
- package/package.json +1 -1
- package/dist/cli-bundle/chunks/activity-WJCGCYPU.js +0 -18
- package/dist/cli-bundle/chunks/activity-Z6QUAUSG.js +0 -22
- package/dist/cli-bundle/chunks/aggregate-BDM6EIAR.js +0 -25
- package/dist/cli-bundle/chunks/aggregate-VQ2DHU3S.js +0 -21
- package/dist/cli-bundle/chunks/append-RKJYPU74.js +0 -15
- package/dist/cli-bundle/chunks/chunk-2XG4IZON.js +0 -218
- package/dist/cli-bundle/chunks/chunk-2XG4IZON.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-37E72CNS.js +0 -217
- package/dist/cli-bundle/chunks/chunk-37E72CNS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js +0 -228
- package/dist/cli-bundle/chunks/chunk-3GCS5SKL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js +0 -2330
- package/dist/cli-bundle/chunks/chunk-3KTN6IBA.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3VHSI5FL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js +0 -278
- package/dist/cli-bundle/chunks/chunk-425E4QL5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-46CUF5L6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +0 -87
- package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js +0 -249
- package/dist/cli-bundle/chunks/chunk-4HIFVN7N.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js +0 -819
- package/dist/cli-bundle/chunks/chunk-4IWYTWGF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js +0 -279
- package/dist/cli-bundle/chunks/chunk-4MZVRJOE.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-57NWPFF2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js +0 -268
- package/dist/cli-bundle/chunks/chunk-5AJXHQM7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5BMM6XQY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js +0 -1868
- package/dist/cli-bundle/chunks/chunk-5GZ7TDD6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js +0 -1749
- package/dist/cli-bundle/chunks/chunk-5VAA4YHR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-64YKRTSV.js +0 -1961
- package/dist/cli-bundle/chunks/chunk-64YKRTSV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js +0 -23
- package/dist/cli-bundle/chunks/chunk-7C2O74AE.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js +0 -421
- package/dist/cli-bundle/chunks/chunk-B7FRNMYN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js +0 -1985
- package/dist/cli-bundle/chunks/chunk-C5JBZRPU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-CL36D4PC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-COSPOP7H.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js +0 -3461
- package/dist/cli-bundle/chunks/chunk-COWTDV6B.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js +0 -1858
- package/dist/cli-bundle/chunks/chunk-DEWEK6AN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-DMRNBQOI.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js +0 -1932
- package/dist/cli-bundle/chunks/chunk-E3SZTQ4K.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EGAP5OWD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EKFNL33R.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js +0 -1704
- package/dist/cli-bundle/chunks/chunk-ENGQOEUY.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EOKXK3R3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js +0 -231
- package/dist/cli-bundle/chunks/chunk-FLZSGSQR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js +0 -2090
- package/dist/cli-bundle/chunks/chunk-FOUYJE4A.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js +0 -1570
- package/dist/cli-bundle/chunks/chunk-G24G7ZAV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js +0 -239
- package/dist/cli-bundle/chunks/chunk-GEYZ4G4O.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js +0 -530
- package/dist/cli-bundle/chunks/chunk-GPLPTGOV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-GZRDYONU.js +0 -1005
- package/dist/cli-bundle/chunks/chunk-GZRDYONU.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js +0 -277
- package/dist/cli-bundle/chunks/chunk-HN6NSXNW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js +0 -309
- package/dist/cli-bundle/chunks/chunk-IQNVQHOP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JINYH2DB.js +0 -371
- package/dist/cli-bundle/chunks/chunk-JINYH2DB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js +0 -2257
- package/dist/cli-bundle/chunks/chunk-JQXPY7DN.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-K46RF36U.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js +0 -371
- package/dist/cli-bundle/chunks/chunk-KERMZVY5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js +0 -76
- package/dist/cli-bundle/chunks/chunk-KSRUHV2H.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js +0 -140
- package/dist/cli-bundle/chunks/chunk-LP3HSFZ2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js +0 -1601
- package/dist/cli-bundle/chunks/chunk-MAWDPCJW.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js +0 -1031
- package/dist/cli-bundle/chunks/chunk-MFAZSEM5.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js +0 -995
- package/dist/cli-bundle/chunks/chunk-MFSCBT5Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js +0 -296
- package/dist/cli-bundle/chunks/chunk-ML5X7DP2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MLIYFOE7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js +0 -2043
- package/dist/cli-bundle/chunks/chunk-MR6FJ7LL.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js +0 -2033
- package/dist/cli-bundle/chunks/chunk-MXYA5SAJ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js +0 -1604
- package/dist/cli-bundle/chunks/chunk-N745W3B3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js +0 -1615
- package/dist/cli-bundle/chunks/chunk-NMP5I3I5.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js +0 -20
- package/dist/cli-bundle/chunks/chunk-NNHHXJB2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js +0 -143
- package/dist/cli-bundle/chunks/chunk-PZUGEOPS.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QLMX7SRD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js +0 -398
- package/dist/cli-bundle/chunks/chunk-QX6HM775.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QZ342C63.js +0 -220
- package/dist/cli-bundle/chunks/chunk-QZ342C63.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js +0 -368
- package/dist/cli-bundle/chunks/chunk-R2EMWY7Q.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RFNYTESG.js +0 -520
- package/dist/cli-bundle/chunks/chunk-RFNYTESG.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js +0 -79
- package/dist/cli-bundle/chunks/chunk-RKQOO2UM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js +0 -282
- package/dist/cli-bundle/chunks/chunk-RQLT6ZWB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js +0 -274
- package/dist/cli-bundle/chunks/chunk-S3JS6YVZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-SCUR7K7N.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js +0 -1977
- package/dist/cli-bundle/chunks/chunk-SHQY2IDC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js +0 -1041
- package/dist/cli-bundle/chunks/chunk-SPZ6DOGY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-T42JWV3F.js +0 -822
- package/dist/cli-bundle/chunks/chunk-T42JWV3F.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TKD5VCTD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TULGS6X6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js +0 -2306
- package/dist/cli-bundle/chunks/chunk-TZXRBVAM.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VIIUS6N6.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VPIM42PC.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js +0 -368
- package/dist/cli-bundle/chunks/chunk-VQRSPVME.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +0 -84
- package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js +0 -3423
- package/dist/cli-bundle/chunks/chunk-WG34ZNQQ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js +0 -2247
- package/dist/cli-bundle/chunks/chunk-WLSM645P.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WRTENIX3.js +0 -215
- package/dist/cli-bundle/chunks/chunk-WRTENIX3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js +0 -388
- package/dist/cli-bundle/chunks/chunk-WSBLYDWV.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js +0 -306
- package/dist/cli-bundle/chunks/chunk-XC5BURG2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js +0 -424
- package/dist/cli-bundle/chunks/chunk-XDB7RWQT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js +0 -2128
- package/dist/cli-bundle/chunks/chunk-Y6BK55A3.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Z3U3U5KD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js +0 -299
- package/dist/cli-bundle/chunks/chunk-ZO3XKAOP.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-ZSUS2OD3.js.map +0 -7
- package/dist/cli-bundle/chunks/claim-RFS7BROJ.js +0 -19
- package/dist/cli-bundle/chunks/claim-XP5AWZ5H.js +0 -23
- package/dist/cli-bundle/chunks/close-GEANHQ2J.js +0 -16
- package/dist/cli-bundle/chunks/close-many-CMZW7ITN.js +0 -31
- package/dist/cli-bundle/chunks/close-many-ZFDIG6M7.js +0 -27
- package/dist/cli-bundle/chunks/comments-MFSYVNNU.js +0 -21
- package/dist/cli-bundle/chunks/comments-XUBPXDYX.js +0 -17
- package/dist/cli-bundle/chunks/config-D7XQMONX.js +0 -18
- package/dist/cli-bundle/chunks/config-T4FHBSYN.js +0 -22
- package/dist/cli-bundle/chunks/context-DIU275XI.js +0 -48
- package/dist/cli-bundle/chunks/context-JCOYB4LZ.js +0 -44
- package/dist/cli-bundle/chunks/contracts-BVO7CSLK.js +0 -12
- package/dist/cli-bundle/chunks/copy-NAGLGMHZ.js +0 -13
- package/dist/cli-bundle/chunks/create-4V7SWNBB.js +0 -30
- package/dist/cli-bundle/chunks/delete-NQI5OSKN.js +0 -14
- package/dist/cli-bundle/chunks/deps-T7SCWXEX.js +0 -17
- package/dist/cli-bundle/chunks/docs-WL2IWGWV.js +0 -18
- package/dist/cli-bundle/chunks/eval-NF2J5SHR.js +0 -23
- package/dist/cli-bundle/chunks/eval-SKDT3MZU.js +0 -27
- package/dist/cli-bundle/chunks/extension-LAXKCAYE.js +0 -42
- package/dist/cli-bundle/chunks/extension-ZISPBRBC.js +0 -38
- package/dist/cli-bundle/chunks/files-EWRQHGIS.js +0 -22
- package/dist/cli-bundle/chunks/focus-4T7TM4MT.js +0 -18
- package/dist/cli-bundle/chunks/focus-L3YUASOD.js +0 -14
- package/dist/cli-bundle/chunks/gc-2PCTYYRI.js +0 -12
- package/dist/cli-bundle/chunks/get-7DMITJ3G.js +0 -23
- package/dist/cli-bundle/chunks/get-VKQXCXLL.js +0 -19
- package/dist/cli-bundle/chunks/health-CVSTAR2F.js +0 -31
- package/dist/cli-bundle/chunks/health-TV3GKTFN.js +0 -35
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js +0 -20
- package/dist/cli-bundle/chunks/history-D4JUX5XV.js.map +0 -7
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js +0 -24
- package/dist/cli-bundle/chunks/history-LQ2UWZTE.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-3MNXLKAT.js.map +0 -1
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js +0 -25
- package/dist/cli-bundle/chunks/history-compact-QWEO32FP.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js +0 -21
- package/dist/cli-bundle/chunks/history-redact-3OIVBVIY.js.map +0 -7
- package/dist/cli-bundle/chunks/history-redact-P6DYF55G.js.map +0 -1
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js +0 -23
- package/dist/cli-bundle/chunks/history-repair-I3E73UGQ.js.map +0 -7
- package/dist/cli-bundle/chunks/history-repair-ZJQFMWPD.js.map +0 -1
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js +0 -30
- package/dist/cli-bundle/chunks/init-C3LJPWQZ.js.map +0 -1
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js +0 -26
- package/dist/cli-bundle/chunks/init-J3DPGWQI.js.map +0 -7
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js +0 -21
- package/dist/cli-bundle/chunks/learnings-5BO2SNDW.js.map +0 -1
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js +0 -17
- package/dist/cli-bundle/chunks/learnings-OGP4JB4I.js.map +0 -7
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js +0 -36
- package/dist/cli-bundle/chunks/list-O5NZVSPN.js.map +0 -1
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js +0 -32
- package/dist/cli-bundle/chunks/list-Z55YCNTC.js.map +0 -7
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js +0 -28
- package/dist/cli-bundle/chunks/next-GBNTGXFC.js.map +0 -7
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js +0 -32
- package/dist/cli-bundle/chunks/next-QKW7PTKE.js.map +0 -1
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js +0 -17
- package/dist/cli-bundle/chunks/notes-R5FZTKWF.js.map +0 -7
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js +0 -21
- package/dist/cli-bundle/chunks/notes-WCGIULVG.js.map +0 -1
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js +0 -29
- package/dist/cli-bundle/chunks/plan-ADISFYH4.js.map +0 -7
- package/dist/cli-bundle/chunks/plan-CHVE7PBR.js.map +0 -1
- package/dist/cli-bundle/chunks/profile-LD23PSI6.js.map +0 -7
- package/dist/cli-bundle/chunks/profile-ZXGSKBJD.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-B42JCCOI.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-OEYQHFXO.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js +0 -19
- package/dist/cli-bundle/chunks/register-operations-I3M3U7DS.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js +0 -23
- package/dist/cli-bundle/chunks/register-operations-UHKENLZV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-setup-3ZVVX2VN.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-Q6KFNIOZ.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-5RQHAPMA.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js +0 -19
- package/dist/cli-bundle/chunks/restore-PNEIBBLW.js.map +0 -7
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js +0 -29
- package/dist/cli-bundle/chunks/scheduling-shortcuts-4G56YHVQ.js.map +0 -1
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js +0 -25
- package/dist/cli-bundle/chunks/scheduling-shortcuts-75DULBYP.js.map +0 -7
- package/dist/cli-bundle/chunks/schema-245WW4G2.js.map +0 -1
- package/dist/cli-bundle/chunks/schema-HBORFC6B.js.map +0 -7
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js +0 -34
- package/dist/cli-bundle/chunks/search-AOZC5SIK.js.map +0 -7
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js +0 -38
- package/dist/cli-bundle/chunks/search-DRXPGHD7.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js +0 -21
- package/dist/cli-bundle/chunks/stats-NJG4NLHG.js.map +0 -1
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js +0 -17
- package/dist/cli-bundle/chunks/stats-RG6AG4N2.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js +0 -14
- package/dist/cli-bundle/chunks/telemetry-HQC2JJIF.js.map +0 -7
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js +0 -18
- package/dist/cli-bundle/chunks/telemetry-MPNL3HHY.js.map +0 -1
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js +0 -39
- package/dist/cli-bundle/chunks/test-6CMOCWUC.js.map +0 -7
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js +0 -43
- package/dist/cli-bundle/chunks/test-RI7XHBZL.js.map +0 -1
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js +0 -29
- package/dist/cli-bundle/chunks/test-all-7R7YRZIA.js.map +0 -7
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js +0 -33
- package/dist/cli-bundle/chunks/test-all-QEIORFYW.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js +0 -28
- package/dist/cli-bundle/chunks/test-runs-5Y2BOU2S.js.map +0 -1
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js +0 -24
- package/dist/cli-bundle/chunks/test-runs-PVGC3GRZ.js.map +0 -7
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js +0 -30
- package/dist/cli-bundle/chunks/update-QVJDFEAP.js.map +0 -1
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js +0 -26
- package/dist/cli-bundle/chunks/update-VQVHAY6X.js.map +0 -7
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js +0 -37
- package/dist/cli-bundle/chunks/update-many-S7XWBSB3.js.map +0 -7
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js +0 -41
- package/dist/cli-bundle/chunks/update-many-YIYW6XQ6.js.map +0 -1
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js +0 -24
- package/dist/cli-bundle/chunks/upgrade-OPRXA56R.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js +0 -28
- package/dist/cli-bundle/chunks/upgrade-WH4BTQLX.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js +0 -36
- package/dist/cli-bundle/chunks/validate-4NTXSB62.js.map +0 -1
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js +0 -32
- package/dist/cli-bundle/chunks/validate-MUFXQZMI.js.map +0 -7
- /package/dist/cli-bundle/chunks/{activity-WJCGCYPU.js.map → append-F7WPGIQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-Z6QUAUSG.js.map → append-PVCTBVJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R5BMJX33.js.map → chunk-2LEJGRQ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AZYGZGGI.js.map → chunk-2TILG6F2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GJ7QC5DJ.js.map → chunk-3TYOW6RR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-B6DUFX6H.js.map → chunk-3X542TEY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JJP45OEI.js.map → chunk-7VQ3JJN5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MWMVPCIE.js.map → chunk-AGAVEDIE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-22KBU3MW.js.map → chunk-AJUON7E6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IWVU4C2F.js.map → chunk-DR2V5OIV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XG625QP4.js.map → chunk-EDO7VXSO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y4M7CPQP.js.map → chunk-EVEPHNXJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JDDLOQAE.js.map → chunk-FN6SB4HU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-24YG75HI.js.map → chunk-H2SMKL2N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EGY6JBQ3.js.map → chunk-HX6QXV5P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-Y46GD4IX.js.map → chunk-P3MJJW7P.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MVYWGY2A.js.map → chunk-PDXJXEZJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AGHMOTGM.js.map → chunk-TEKZOS7M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JVH7QBVV.js.map → chunk-V5ZWKJNY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KUOOJR35.js.map → chunk-VLEA2UTQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MUH7A3FD.js.map → chunk-WCWVEXGA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NGXQ3PFT.js.map → chunk-YPMZMKN7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KGFUY7WN.js.map → chunk-YTD5GICJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7DT4WSH2.js.map → chunk-ZO7CLOY2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-BDM6EIAR.js.map → close-3YYQ5OG2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{aggregate-VQ2DHU3S.js.map → close-Z3Q4U7TS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-RKJYPU74.js.map → close-many-3L2RXH3M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-BGML6VLD.js.map → close-many-D366FTIG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-XP5AWZ5H.js.map → comments-54XDJNFE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-RFS7BROJ.js.map → comments-HGHC2PN6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-2SSSHHUZ.js.map → copy-44RT5GDW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-GEANHQ2J.js.map → copy-UGMUGHZA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-CMZW7ITN.js.map → create-4GWJWPXG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-ZFDIG6M7.js.map → create-AZXCUYKP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-XUBPXDYX.js.map → delete-Y6SXIQ4X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-MFSYVNNU.js.map → delete-YQ2VPXNF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-T4FHBSYN.js.map → deps-BU5EBJDU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-D7XQMONX.js.map → deps-FMANWFRP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-DIU275XI.js.map → docs-OQBSJNIA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{context-JCOYB4LZ.js.map → docs-VNPBZXEL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-BVO7CSLK.js.map → files-72HZEBOE.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{contracts-NYPEW2G4.js.map → files-HTSB2KJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-32ROBIDL.js.map → focus-FOG4ALC2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-NAGLGMHZ.js.map → focus-SUTMKXGX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-E77SDCUP.js.map → history-compact-M6IFAMBP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-4V7SWNBB.js.map → history-compact-NEXRPP2O.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-RA5KTCLB.js.map → history-redact-NQX3OGZP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-NQI5OSKN.js.map → history-redact-WQJBZ3PX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-T7SCWXEX.js.map → history-repair-CBHMHAJO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-32SU7HO5.js.map → history-repair-NHOJG7WO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-WL2IWGWV.js.map → learnings-M64NTSOR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-RRUPT7O2.js.map → learnings-T63JGKKN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-NF2J5SHR.js.map → notes-73WE2UV2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{eval-SKDT3MZU.js.map → notes-U7L6HQQ2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-ZISPBRBC.js.map → plan-OSCNYFGC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-LAXKCAYE.js.map → plan-TN537L24.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-PYKR2UUG.js.map → profile-MHAMXMHQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-EWRQHGIS.js.map → profile-TIGLAKJ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-4T7TM4MT.js.map → restore-HC3YSWF7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{focus-L3YUASOD.js.map → restore-LFAMMRYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-2PCTYYRI.js.map → schema-DAGSYO6E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-2DNMPXMC.js.map → schema-UBXJCQAC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-VKQXCXLL.js.map → update-CJGG5WMV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-7DMITJ3G.js.map → update-LKD64AFP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-CVSTAR2F.js.map → update-many-G4SM7BHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{health-TV3GKTFN.js.map → update-many-VLIV3D7R.js.map} +0 -0
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="143ba130-1e4a-555a-ad5a-281c82c7f363")}catch(e){}}();
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
5
|
+
CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
6
|
+
CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,
|
|
7
|
+
CREATE_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
8
|
+
LIST_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
9
|
+
NEXT_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
10
|
+
SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
11
|
+
UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,
|
|
12
|
+
UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,
|
|
13
|
+
readFirstStringFromCommanderOptions,
|
|
14
|
+
readFirstValueFromCommanderOptions,
|
|
15
|
+
readStringArrayFromCommanderOptions
|
|
16
|
+
} from "./chunk-2APXX4TZ.js";
|
|
7
17
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
18
|
+
printError,
|
|
19
|
+
writeStdout
|
|
20
|
+
} from "./chunk-EOUVR7JN.js";
|
|
10
21
|
import {
|
|
22
|
+
PmCliError,
|
|
11
23
|
getActiveExtensionRegistrations,
|
|
12
|
-
|
|
13
|
-
|
|
24
|
+
locateItem,
|
|
25
|
+
nowIso,
|
|
26
|
+
readLocatedItem,
|
|
27
|
+
readSettings,
|
|
28
|
+
setActiveCommandResult
|
|
29
|
+
} from "./chunk-GH73UOSJ.js";
|
|
14
30
|
import {
|
|
31
|
+
EXIT_CODE,
|
|
15
32
|
coercePositiveInteger,
|
|
16
33
|
getSettingsPath,
|
|
17
34
|
isFiniteNumberArray,
|
|
@@ -20,11 +37,18 @@ import {
|
|
|
20
37
|
removeFileIfExists,
|
|
21
38
|
resolveItemTypeRegistry,
|
|
22
39
|
resolvePmPackageRootFromModule,
|
|
40
|
+
resolvePmRoot,
|
|
23
41
|
toErrorMessage,
|
|
24
42
|
toNonEmptyString,
|
|
25
43
|
trimTrailingSlashes,
|
|
26
44
|
writeFileAtomic
|
|
27
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-UO7XAZK6.js";
|
|
46
|
+
|
|
47
|
+
// dist/cli/registration-helpers.js
|
|
48
|
+
import { Option } from "commander";
|
|
49
|
+
|
|
50
|
+
// dist/core/search/cache.js
|
|
51
|
+
import path2 from "node:path";
|
|
28
52
|
|
|
29
53
|
// dist/core/search/http-client.js
|
|
30
54
|
var DEFAULT_SEARCH_HTTP_TIMEOUT_MS = 3e4;
|
|
@@ -511,12 +535,157 @@ function buildSemanticCorpusInput(document, options = {}) {
|
|
|
511
535
|
return `${serialized.slice(0, keepLength)}${SEMANTIC_CORPUS_TRUNCATION_SUFFIX}`;
|
|
512
536
|
}
|
|
513
537
|
|
|
538
|
+
// dist/core/search/embedding-batches.js
|
|
539
|
+
function resolveBatchRuntime(settings, maxInputCharacters) {
|
|
540
|
+
const batchSizeCandidate = settings.search.embedding_batch_size;
|
|
541
|
+
const timeoutMsCandidate = settings.search.embedding_timeout_ms;
|
|
542
|
+
const maxRetriesCandidate = settings.search.scanner_max_batch_retries;
|
|
543
|
+
const batchSize = Number.isFinite(batchSizeCandidate) && batchSizeCandidate > 0 ? Math.floor(batchSizeCandidate) : 1;
|
|
544
|
+
const timeoutMs = Number.isFinite(timeoutMsCandidate) && timeoutMsCandidate > 0 ? Math.floor(timeoutMsCandidate) : 3e4;
|
|
545
|
+
const maxRetries = Number.isFinite(maxRetriesCandidate) && maxRetriesCandidate >= 0 ? Math.floor(maxRetriesCandidate) : 0;
|
|
546
|
+
return {
|
|
547
|
+
batchSize,
|
|
548
|
+
timeoutMs,
|
|
549
|
+
maxRetries,
|
|
550
|
+
maxBatchInputCharacters: Number.POSITIVE_INFINITY,
|
|
551
|
+
maxInputCharacters
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
function createBatches(inputs, batchSize, maxBatchInputCharacters) {
|
|
555
|
+
const batches = [];
|
|
556
|
+
let currentBatch = [];
|
|
557
|
+
let currentCharacters = 0;
|
|
558
|
+
for (const input of inputs) {
|
|
559
|
+
const wouldExceedCount = currentBatch.length >= batchSize;
|
|
560
|
+
const wouldExceedCharacters = currentBatch.length > 0 && Number.isFinite(maxBatchInputCharacters) && currentCharacters + input.length > maxBatchInputCharacters;
|
|
561
|
+
if (wouldExceedCount || wouldExceedCharacters) {
|
|
562
|
+
batches.push(currentBatch);
|
|
563
|
+
currentBatch = [];
|
|
564
|
+
currentCharacters = 0;
|
|
565
|
+
}
|
|
566
|
+
currentBatch.push(input);
|
|
567
|
+
currentCharacters += input.length;
|
|
568
|
+
}
|
|
569
|
+
batches.push(currentBatch);
|
|
570
|
+
return batches;
|
|
571
|
+
}
|
|
572
|
+
function resolveProviderBatchRuntime(provider, runtime) {
|
|
573
|
+
if (provider.name !== "ollama") {
|
|
574
|
+
return runtime;
|
|
575
|
+
}
|
|
576
|
+
return {
|
|
577
|
+
...runtime,
|
|
578
|
+
maxBatchInputCharacters: OLLAMA_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
function truncateInputForRuntime(input, maxInputCharacters) {
|
|
582
|
+
if (!Number.isFinite(maxInputCharacters) || maxInputCharacters <= 0 || input.length <= maxInputCharacters) {
|
|
583
|
+
return input;
|
|
584
|
+
}
|
|
585
|
+
const keepLength = Math.max(0, maxInputCharacters - SEMANTIC_CORPUS_TRUNCATION_SUFFIX.length);
|
|
586
|
+
return `${input.slice(0, keepLength)}${SEMANTIC_CORPUS_TRUNCATION_SUFFIX}`.slice(0, maxInputCharacters);
|
|
587
|
+
}
|
|
588
|
+
function isEmbeddingTimeoutError(error) {
|
|
589
|
+
const message = toErrorMessage(error).toLowerCase();
|
|
590
|
+
return message.includes("timed out") || message.includes("timeout");
|
|
591
|
+
}
|
|
592
|
+
function buildEmbeddingFailureMessage(provider, batchLabel, batchSize, timeoutMs, attempts, error) {
|
|
593
|
+
const base = `Embedding batch ${batchLabel} failed after ${attempts} attempt(s): ${toErrorMessage(error)}`;
|
|
594
|
+
const details = `provider=${provider.name} model=${provider.model} batch_size=${batchSize} timeout_ms=${timeoutMs}`;
|
|
595
|
+
if (!isEmbeddingTimeoutError(error)) {
|
|
596
|
+
return `${base} (${details})`;
|
|
597
|
+
}
|
|
598
|
+
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)`;
|
|
599
|
+
}
|
|
600
|
+
async function executeBatchWithAdaptiveSplit(provider, batch, batchLabel, timeoutMs, maxRetries, warnings) {
|
|
601
|
+
let lastError = null;
|
|
602
|
+
for (let attempt = 0; attempt <= maxRetries; attempt += 1) {
|
|
603
|
+
try {
|
|
604
|
+
const batchVectors = await executeEmbeddingRequest(provider, batch, { timeout_ms: timeoutMs });
|
|
605
|
+
if (attempt > 0) {
|
|
606
|
+
warnings.push(`search_embedding_batch_retry_succeeded:batch=${batchLabel}:attempt=${attempt + 1}:size=${batch.length}`);
|
|
607
|
+
}
|
|
608
|
+
return batchVectors;
|
|
609
|
+
} catch (error) {
|
|
610
|
+
lastError = error;
|
|
611
|
+
if (isEmbeddingTimeoutError(error) && batch.length > 1) {
|
|
612
|
+
const midpoint = Math.ceil(batch.length / 2);
|
|
613
|
+
const left = batch.slice(0, midpoint);
|
|
614
|
+
const right = batch.slice(midpoint);
|
|
615
|
+
warnings.push(`search_embedding_batch_split_after_timeout:batch=${batchLabel}:size=${batch.length}:parts=${left.length}|${right.length}`);
|
|
616
|
+
return [
|
|
617
|
+
...await executeBatchWithAdaptiveSplit(provider, left, `${batchLabel}.1`, timeoutMs, maxRetries, warnings),
|
|
618
|
+
...await executeBatchWithAdaptiveSplit(provider, right, `${batchLabel}.2`, timeoutMs, maxRetries, warnings)
|
|
619
|
+
];
|
|
620
|
+
}
|
|
621
|
+
if (attempt < maxRetries) {
|
|
622
|
+
const delayMs = Math.min(1e3 * 2 ** attempt, 8e3);
|
|
623
|
+
await new Promise((resolve2) => setTimeout(resolve2, delayMs));
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
throw new Error(buildEmbeddingFailureMessage(provider, batchLabel, batch.length, timeoutMs, maxRetries + 1, lastError));
|
|
628
|
+
}
|
|
629
|
+
async function executeEmbeddingBatchesWithRetry(provider, settings, inputs, options = {}) {
|
|
630
|
+
if (inputs.length === 0) {
|
|
631
|
+
return {
|
|
632
|
+
vectors: [],
|
|
633
|
+
warnings: []
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
const warnings = [];
|
|
637
|
+
const corpusLimitResolution = resolveSemanticCorpusCharacterLimit(provider.name, settings.search.embedding_corpus_max_characters);
|
|
638
|
+
if (corpusLimitResolution.warning) {
|
|
639
|
+
warnings.push(corpusLimitResolution.warning);
|
|
640
|
+
}
|
|
641
|
+
const runtime = resolveProviderBatchRuntime(provider, resolveBatchRuntime(settings, corpusLimitResolution.maxCharacters));
|
|
642
|
+
let truncatedInputCount = 0;
|
|
643
|
+
const normalizedInputs = inputs.map((input) => {
|
|
644
|
+
const normalized = truncateInputForRuntime(input, runtime.maxInputCharacters);
|
|
645
|
+
if (normalized.length < input.length) {
|
|
646
|
+
truncatedInputCount += 1;
|
|
647
|
+
}
|
|
648
|
+
return normalized;
|
|
649
|
+
});
|
|
650
|
+
if (truncatedInputCount > 0) {
|
|
651
|
+
warnings.push(`search_embedding_input_truncated:count=${truncatedInputCount}:max_characters=${runtime.maxInputCharacters}`);
|
|
652
|
+
}
|
|
653
|
+
const batches = createBatches(normalizedInputs, runtime.batchSize, runtime.maxBatchInputCharacters);
|
|
654
|
+
const vectors = [];
|
|
655
|
+
let completedInputs = 0;
|
|
656
|
+
for (let batchIndex = 0; batchIndex < batches.length; batchIndex += 1) {
|
|
657
|
+
const batch = batches[batchIndex];
|
|
658
|
+
options.onProgress?.({
|
|
659
|
+
batch_index: batchIndex + 1,
|
|
660
|
+
batch_total: batches.length,
|
|
661
|
+
batch_size: batch.length,
|
|
662
|
+
completed_inputs: completedInputs,
|
|
663
|
+
total_inputs: normalizedInputs.length,
|
|
664
|
+
phase: "start"
|
|
665
|
+
});
|
|
666
|
+
vectors.push(...await executeBatchWithAdaptiveSplit(provider, batch, String(batchIndex + 1), runtime.timeoutMs, runtime.maxRetries, warnings));
|
|
667
|
+
completedInputs += batch.length;
|
|
668
|
+
options.onProgress?.({
|
|
669
|
+
batch_index: batchIndex + 1,
|
|
670
|
+
batch_total: batches.length,
|
|
671
|
+
batch_size: batch.length,
|
|
672
|
+
completed_inputs: completedInputs,
|
|
673
|
+
total_inputs: normalizedInputs.length,
|
|
674
|
+
phase: "complete"
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
return {
|
|
678
|
+
vectors,
|
|
679
|
+
warnings
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
|
|
514
683
|
// dist/core/search/semantic-defaults.js
|
|
515
684
|
import { spawnSync } from "node:child_process";
|
|
516
685
|
var DISABLE_AUTO_DEFAULTS_ENV = "PM_DISABLE_OLLAMA_AUTO_DEFAULTS";
|
|
517
686
|
var OLLAMA_MODEL_ENV = "PM_OLLAMA_MODEL";
|
|
518
687
|
var DEFAULT_OLLAMA_BASE_URL = "http://localhost:11434";
|
|
519
|
-
var
|
|
688
|
+
var RECOMMENDED_OLLAMA_EMBEDDING_MODEL = "qwen3-embedding:0.6b";
|
|
520
689
|
var DEFAULT_LANCEDB_PATH = ".agents/pm/search/lancedb/";
|
|
521
690
|
var OLLAMA_VERSION_TIMEOUT_MS = 1500;
|
|
522
691
|
var OLLAMA_LIST_TIMEOUT_MS = 2500;
|
|
@@ -606,7 +775,7 @@ function resolveAutoOllamaModel(settings) {
|
|
|
606
775
|
return listedModel;
|
|
607
776
|
}
|
|
608
777
|
}
|
|
609
|
-
return
|
|
778
|
+
return null;
|
|
610
779
|
}
|
|
611
780
|
function resolveSemanticDefaultNeeds(settings) {
|
|
612
781
|
return {
|
|
@@ -667,6 +836,13 @@ function resolveSettingsWithSemanticRuntimeDefaults(settings) {
|
|
|
667
836
|
}
|
|
668
837
|
const nextSettings = structuredClone(settings);
|
|
669
838
|
const resolvedModel = resolveAutoOllamaModel(nextSettings);
|
|
839
|
+
if (!resolvedModel) {
|
|
840
|
+
return {
|
|
841
|
+
...unchanged,
|
|
842
|
+
auto_ollama_defaults_skipped_reason: "no_installed_embedding_model",
|
|
843
|
+
auto_ollama_defaults_remediation: `Run ollama pull ${RECOMMENDED_OLLAMA_EMBEDDING_MODEL} or configure providers.ollama.model explicitly (and search.embedding_model if you need an override).`
|
|
844
|
+
};
|
|
845
|
+
}
|
|
670
846
|
applyOllamaProviderDefaults(nextSettings, needs, resolvedModel);
|
|
671
847
|
applyVectorStoreDefaults(nextSettings, needs);
|
|
672
848
|
applySearchEmbeddingDefaults(nextSettings, needs, resolvedModel);
|
|
@@ -676,90 +852,226 @@ function resolveSettingsWithSemanticRuntimeDefaults(settings) {
|
|
|
676
852
|
};
|
|
677
853
|
}
|
|
678
854
|
|
|
679
|
-
// dist/core/search/
|
|
680
|
-
import {
|
|
681
|
-
import {
|
|
682
|
-
|
|
683
|
-
var
|
|
684
|
-
var
|
|
685
|
-
var
|
|
686
|
-
var
|
|
687
|
-
var
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
function normalizeVector(value) {
|
|
693
|
-
if (!isFiniteNumberArray(value) || value.length === 0) {
|
|
694
|
-
throw new Error("Vector values must be a non-empty numeric array");
|
|
855
|
+
// dist/core/search/background-refresh.js
|
|
856
|
+
import { spawn } from "node:child_process";
|
|
857
|
+
import { mkdirSync, rmSync, statSync } from "node:fs";
|
|
858
|
+
import path from "node:path";
|
|
859
|
+
var REINDEX_LOCK_ID = "reindex";
|
|
860
|
+
var PENDING_QUEUE_REL_PATH = "search/pending-refresh.json";
|
|
861
|
+
var PENDING_QUEUE_GATE_REL_PATH = "search/pending-refresh.gate.lock";
|
|
862
|
+
var PENDING_QUEUE_GATE_STALE_MS = 3e4;
|
|
863
|
+
var SEARCH_REFRESH_INLINE_ENV = "PM_SEARCH_REFRESH_INLINE";
|
|
864
|
+
var SEARCH_REFRESH_CHILD_ENV = "PM_SEARCH_REFRESH_CHILD";
|
|
865
|
+
function parseBooleanTrueLike(value) {
|
|
866
|
+
if (typeof value !== "string") {
|
|
867
|
+
return false;
|
|
695
868
|
}
|
|
696
|
-
|
|
869
|
+
const normalized = value.trim().toLowerCase();
|
|
870
|
+
return normalized === "1" || normalized === "true" || normalized === "yes" || normalized === "on";
|
|
697
871
|
}
|
|
698
|
-
function
|
|
699
|
-
if (
|
|
700
|
-
|
|
872
|
+
function shouldRunSearchRefreshInForeground() {
|
|
873
|
+
if (parseBooleanTrueLike(process.env[SEARCH_REFRESH_INLINE_ENV])) {
|
|
874
|
+
return true;
|
|
701
875
|
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
function normalizeQdrantQueryResponse(payload) {
|
|
705
|
-
const result = payload.result;
|
|
706
|
-
if (!Array.isArray(result)) {
|
|
707
|
-
throw new TypeError("Qdrant query response must include a result array");
|
|
876
|
+
if (parseBooleanTrueLike(process.env[SEARCH_REFRESH_CHILD_ENV])) {
|
|
877
|
+
return true;
|
|
708
878
|
}
|
|
709
|
-
const
|
|
710
|
-
|
|
711
|
-
const idCandidate = typeof idValue === "number" ? String(idValue) : idValue;
|
|
712
|
-
const id = toNonEmptyString(idCandidate);
|
|
713
|
-
if (!id) {
|
|
714
|
-
throw new Error(`Qdrant query response entry at index ${index} is missing a non-empty id`);
|
|
715
|
-
}
|
|
716
|
-
const score = entry.score;
|
|
717
|
-
if (typeof score !== "number" || !Number.isFinite(score)) {
|
|
718
|
-
throw new TypeError(`Qdrant query response entry at index ${index} is missing a finite numeric score`);
|
|
719
|
-
}
|
|
720
|
-
const payloadValue = entry.payload;
|
|
721
|
-
if (payloadValue !== void 0 && (typeof payloadValue !== "object" || payloadValue === null || Array.isArray(payloadValue))) {
|
|
722
|
-
throw new Error(`Qdrant query response entry at index ${index} must provide payload as an object when set`);
|
|
723
|
-
}
|
|
724
|
-
return {
|
|
725
|
-
id,
|
|
726
|
-
score,
|
|
727
|
-
...payloadValue ? { payload: payloadValue } : {}
|
|
728
|
-
};
|
|
729
|
-
});
|
|
730
|
-
hits.sort((left, right) => {
|
|
731
|
-
if (left.score !== right.score) {
|
|
732
|
-
return right.score - left.score;
|
|
733
|
-
}
|
|
734
|
-
return left.id.localeCompare(right.id);
|
|
735
|
-
});
|
|
736
|
-
return hits;
|
|
879
|
+
const nodeEnv = (process.env.NODE_ENV ?? "").trim().toLowerCase();
|
|
880
|
+
return typeof process.env.VITEST === "string" || typeof process.env.VITEST_WORKER_ID === "string" || nodeEnv === "test";
|
|
737
881
|
}
|
|
738
|
-
function
|
|
739
|
-
|
|
740
|
-
if (nestedStatus) {
|
|
741
|
-
return { status: nestedStatus };
|
|
742
|
-
}
|
|
743
|
-
const topLevelStatus = toNonEmptyString(payload.status);
|
|
744
|
-
if (topLevelStatus) {
|
|
745
|
-
return { status: topLevelStatus };
|
|
746
|
-
}
|
|
747
|
-
throw new Error("Qdrant upsert response must include status metadata");
|
|
882
|
+
function pendingQueuePath(pmRoot) {
|
|
883
|
+
return path.join(pmRoot, PENDING_QUEUE_REL_PATH);
|
|
748
884
|
}
|
|
749
|
-
|
|
750
|
-
return
|
|
751
|
-
endpoint,
|
|
752
|
-
method: plan.method,
|
|
753
|
-
headers: plan.headers,
|
|
754
|
-
body: plan.body,
|
|
755
|
-
timeoutMs,
|
|
756
|
-
fetcher,
|
|
757
|
-
requestLabel: `Vector ${requestKind} request`,
|
|
758
|
-
responseLabel: `Vector ${requestKind} response`
|
|
759
|
-
});
|
|
885
|
+
function pendingQueueGatePath(pmRoot) {
|
|
886
|
+
return path.join(pmRoot, PENDING_QUEUE_GATE_REL_PATH);
|
|
760
887
|
}
|
|
761
|
-
function
|
|
762
|
-
const
|
|
888
|
+
function acquireQueueGate(pmRoot) {
|
|
889
|
+
const gatePath = pendingQueueGatePath(pmRoot);
|
|
890
|
+
try {
|
|
891
|
+
if (Date.now() - statSync(gatePath).mtimeMs < PENDING_QUEUE_GATE_STALE_MS) {
|
|
892
|
+
return false;
|
|
893
|
+
}
|
|
894
|
+
rmSync(gatePath, { recursive: true, force: true });
|
|
895
|
+
} catch {
|
|
896
|
+
}
|
|
897
|
+
try {
|
|
898
|
+
mkdirSync(path.dirname(gatePath), { recursive: true });
|
|
899
|
+
mkdirSync(gatePath);
|
|
900
|
+
return true;
|
|
901
|
+
} catch {
|
|
902
|
+
return false;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
function releaseQueueGate(pmRoot) {
|
|
906
|
+
try {
|
|
907
|
+
rmSync(pendingQueueGatePath(pmRoot), { recursive: true, force: true });
|
|
908
|
+
} catch {
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
async function withQueueGate(pmRoot, fn, fallback) {
|
|
912
|
+
for (let attempt = 0; attempt < 50; attempt += 1) {
|
|
913
|
+
if (acquireQueueGate(pmRoot)) {
|
|
914
|
+
try {
|
|
915
|
+
return await fn();
|
|
916
|
+
} finally {
|
|
917
|
+
releaseQueueGate(pmRoot);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
await delay(20);
|
|
921
|
+
}
|
|
922
|
+
return fallback;
|
|
923
|
+
}
|
|
924
|
+
function delay(ms) {
|
|
925
|
+
return new Promise((resolve2) => {
|
|
926
|
+
setTimeout(resolve2, ms);
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
async function readPendingQueueIds(pmRoot) {
|
|
930
|
+
const raw = await readFileIfExists(pendingQueuePath(pmRoot));
|
|
931
|
+
if (!raw || raw.trim().length === 0) {
|
|
932
|
+
return [];
|
|
933
|
+
}
|
|
934
|
+
try {
|
|
935
|
+
const parsed = JSON.parse(raw);
|
|
936
|
+
if (!Array.isArray(parsed.ids)) {
|
|
937
|
+
return [];
|
|
938
|
+
}
|
|
939
|
+
return parsed.ids.filter((id) => typeof id === "string" && id.length > 0);
|
|
940
|
+
} catch {
|
|
941
|
+
return [];
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
async function writePendingQueueIds(pmRoot, ids) {
|
|
945
|
+
await writeFileAtomic(pendingQueuePath(pmRoot), `${JSON.stringify({ ids })}
|
|
946
|
+
`);
|
|
947
|
+
}
|
|
948
|
+
async function enqueuePendingRefreshIds(pmRoot, itemIds) {
|
|
949
|
+
const incoming = itemIds.filter((id) => typeof id === "string" && id.trim().length > 0);
|
|
950
|
+
if (incoming.length === 0) {
|
|
951
|
+
return;
|
|
952
|
+
}
|
|
953
|
+
const mergeIncoming = async () => {
|
|
954
|
+
const existing = await readPendingQueueIds(pmRoot);
|
|
955
|
+
const merged = [.../* @__PURE__ */ new Set([...existing, ...incoming])].sort((left, right) => left.localeCompare(right));
|
|
956
|
+
await writePendingQueueIds(pmRoot, merged);
|
|
957
|
+
};
|
|
958
|
+
const gated = await withQueueGate(pmRoot, async () => {
|
|
959
|
+
await mergeIncoming();
|
|
960
|
+
return true;
|
|
961
|
+
}, false);
|
|
962
|
+
if (!gated) {
|
|
963
|
+
await mergeIncoming();
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
function searchRefreshRunnerPath() {
|
|
967
|
+
return path.join(resolvePmPackageRootFromModule(import.meta.url, ["../../.."]), "dist", "cli", "search-refresh.js");
|
|
968
|
+
}
|
|
969
|
+
function dispatchRefreshChild(pmRoot) {
|
|
970
|
+
try {
|
|
971
|
+
const child = spawn(process.execPath, [searchRefreshRunnerPath()], {
|
|
972
|
+
detached: true,
|
|
973
|
+
stdio: "ignore",
|
|
974
|
+
env: {
|
|
975
|
+
...process.env,
|
|
976
|
+
PM_PATH: pmRoot,
|
|
977
|
+
[SEARCH_REFRESH_CHILD_ENV]: "1"
|
|
978
|
+
}
|
|
979
|
+
});
|
|
980
|
+
child.on("error", () => {
|
|
981
|
+
});
|
|
982
|
+
child.unref();
|
|
983
|
+
} catch {
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
async function scheduleBackgroundSemanticRefresh(pmRoot, itemIds) {
|
|
987
|
+
await enqueuePendingRefreshIds(pmRoot, itemIds);
|
|
988
|
+
dispatchRefreshChild(pmRoot);
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
// dist/core/search/vector-stores.js
|
|
992
|
+
import { mkdir, readFile, stat, unlink } from "node:fs/promises";
|
|
993
|
+
import { basename, dirname, isAbsolute, join, resolve } from "node:path";
|
|
994
|
+
var DEFAULT_COLLECTION = "pm_items";
|
|
995
|
+
var COLLECTION_SANITIZE_PATTERN = /[^a-zA-Z0-9_-]/g;
|
|
996
|
+
var MAX_COLLECTION_NAME_LENGTH = 128;
|
|
997
|
+
var LANCE_DB_LOCAL_SNAPSHOT_DIR = ".pm-cli-local-vectors";
|
|
998
|
+
var LANCE_DB_LOCAL_SNAPSHOT_VERSION = 1;
|
|
999
|
+
var lanceDbLocalTables = /* @__PURE__ */ new Map();
|
|
1000
|
+
function resolveStoreCollectionName(store) {
|
|
1001
|
+
const candidate = toNonEmptyString(store.collection_name) ?? DEFAULT_COLLECTION;
|
|
1002
|
+
return candidate.replaceAll(COLLECTION_SANITIZE_PATTERN, "_").slice(0, MAX_COLLECTION_NAME_LENGTH);
|
|
1003
|
+
}
|
|
1004
|
+
function normalizeVector(value) {
|
|
1005
|
+
if (!isFiniteNumberArray(value) || value.length === 0) {
|
|
1006
|
+
throw new Error("Vector values must be a non-empty numeric array");
|
|
1007
|
+
}
|
|
1008
|
+
return [...value];
|
|
1009
|
+
}
|
|
1010
|
+
function normalizeLimit(value) {
|
|
1011
|
+
if (!Number.isFinite(value) || value <= 0) {
|
|
1012
|
+
throw new Error("Vector query limit must be a positive number");
|
|
1013
|
+
}
|
|
1014
|
+
return Math.floor(value);
|
|
1015
|
+
}
|
|
1016
|
+
function normalizeQdrantQueryResponse(payload) {
|
|
1017
|
+
const result = payload.result;
|
|
1018
|
+
if (!Array.isArray(result)) {
|
|
1019
|
+
throw new TypeError("Qdrant query response must include a result array");
|
|
1020
|
+
}
|
|
1021
|
+
const hits = result.map((entry, index) => {
|
|
1022
|
+
const idValue = entry.id;
|
|
1023
|
+
const idCandidate = typeof idValue === "number" ? String(idValue) : idValue;
|
|
1024
|
+
const id = toNonEmptyString(idCandidate);
|
|
1025
|
+
if (!id) {
|
|
1026
|
+
throw new Error(`Qdrant query response entry at index ${index} is missing a non-empty id`);
|
|
1027
|
+
}
|
|
1028
|
+
const score = entry.score;
|
|
1029
|
+
if (typeof score !== "number" || !Number.isFinite(score)) {
|
|
1030
|
+
throw new TypeError(`Qdrant query response entry at index ${index} is missing a finite numeric score`);
|
|
1031
|
+
}
|
|
1032
|
+
const payloadValue = entry.payload;
|
|
1033
|
+
if (payloadValue !== void 0 && (typeof payloadValue !== "object" || payloadValue === null || Array.isArray(payloadValue))) {
|
|
1034
|
+
throw new Error(`Qdrant query response entry at index ${index} must provide payload as an object when set`);
|
|
1035
|
+
}
|
|
1036
|
+
return {
|
|
1037
|
+
id,
|
|
1038
|
+
score,
|
|
1039
|
+
...payloadValue ? { payload: payloadValue } : {}
|
|
1040
|
+
};
|
|
1041
|
+
});
|
|
1042
|
+
hits.sort((left, right) => {
|
|
1043
|
+
if (left.score !== right.score) {
|
|
1044
|
+
return right.score - left.score;
|
|
1045
|
+
}
|
|
1046
|
+
return left.id.localeCompare(right.id);
|
|
1047
|
+
});
|
|
1048
|
+
return hits;
|
|
1049
|
+
}
|
|
1050
|
+
function normalizeQdrantUpsertResponse(payload) {
|
|
1051
|
+
const nestedStatus = toNonEmptyString(payload.result?.status);
|
|
1052
|
+
if (nestedStatus) {
|
|
1053
|
+
return { status: nestedStatus };
|
|
1054
|
+
}
|
|
1055
|
+
const topLevelStatus = toNonEmptyString(payload.status);
|
|
1056
|
+
if (topLevelStatus) {
|
|
1057
|
+
return { status: topLevelStatus };
|
|
1058
|
+
}
|
|
1059
|
+
throw new Error("Qdrant upsert response must include status metadata");
|
|
1060
|
+
}
|
|
1061
|
+
async function executeRemoteVectorPlan(endpoint, plan, timeoutMs, fetcher, requestKind) {
|
|
1062
|
+
return await executeSearchJsonRequest({
|
|
1063
|
+
endpoint,
|
|
1064
|
+
method: plan.method,
|
|
1065
|
+
headers: plan.headers,
|
|
1066
|
+
body: plan.body,
|
|
1067
|
+
timeoutMs,
|
|
1068
|
+
fetcher,
|
|
1069
|
+
requestLabel: `Vector ${requestKind} request`,
|
|
1070
|
+
responseLabel: `Vector ${requestKind} response`
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
function resolveQdrantStore(settings) {
|
|
1074
|
+
const url = toNonEmptyString(settings.vector_store?.qdrant?.url);
|
|
763
1075
|
if (!url) {
|
|
764
1076
|
return null;
|
|
765
1077
|
}
|
|
@@ -772,7 +1084,21 @@ function resolveQdrantStore(settings) {
|
|
|
772
1084
|
...apiKey ? { api_key: apiKey } : {}
|
|
773
1085
|
};
|
|
774
1086
|
}
|
|
775
|
-
function
|
|
1087
|
+
function resolveWorkspaceRootFromPmRoot(pmRoot) {
|
|
1088
|
+
const resolved = resolve(pmRoot);
|
|
1089
|
+
const parent = dirname(resolved);
|
|
1090
|
+
if (basename(resolved) === "pm" && basename(parent) === ".agents") {
|
|
1091
|
+
return dirname(parent);
|
|
1092
|
+
}
|
|
1093
|
+
return resolved;
|
|
1094
|
+
}
|
|
1095
|
+
function anchorLanceDbStorePath(storePath, pmRoot) {
|
|
1096
|
+
if (!pmRoot || isAbsolute(storePath)) {
|
|
1097
|
+
return storePath;
|
|
1098
|
+
}
|
|
1099
|
+
return resolve(resolveWorkspaceRootFromPmRoot(pmRoot), storePath);
|
|
1100
|
+
}
|
|
1101
|
+
function resolveLanceDbStore(settings, pmRoot) {
|
|
776
1102
|
const lancedbPath = toNonEmptyString(settings.vector_store?.lancedb?.path);
|
|
777
1103
|
if (!lancedbPath) {
|
|
778
1104
|
return null;
|
|
@@ -780,7 +1106,7 @@ function resolveLanceDbStore(settings) {
|
|
|
780
1106
|
const collectionName = toNonEmptyString(settings.vector_store?.collection_name);
|
|
781
1107
|
return {
|
|
782
1108
|
name: "lancedb",
|
|
783
|
-
path: lancedbPath,
|
|
1109
|
+
path: anchorLanceDbStorePath(lancedbPath, pmRoot),
|
|
784
1110
|
...collectionName && collectionName !== DEFAULT_COLLECTION ? { collection_name: collectionName } : {}
|
|
785
1111
|
};
|
|
786
1112
|
}
|
|
@@ -1015,9 +1341,9 @@ function cosineSimilarity(left, right) {
|
|
|
1015
1341
|
}
|
|
1016
1342
|
return dotProd / (leftNorm * rightNorm);
|
|
1017
1343
|
}
|
|
1018
|
-
function resolveVectorStores(settings) {
|
|
1344
|
+
function resolveVectorStores(settings, pmRoot) {
|
|
1019
1345
|
const qdrant = resolveQdrantStore(settings);
|
|
1020
|
-
const lancedb = resolveLanceDbStore(settings);
|
|
1346
|
+
const lancedb = resolveLanceDbStore(settings, pmRoot);
|
|
1021
1347
|
const available = [qdrant, lancedb].filter((entry) => entry !== null);
|
|
1022
1348
|
const preferredName = toNonEmptyString(settings.vector_store?.adapter);
|
|
1023
1349
|
const preferredKey = preferredName ? preferredName.toLowerCase() : null;
|
|
@@ -1335,311 +1661,27 @@ function inferConsistentVectorDimension(vectors, context) {
|
|
|
1335
1661
|
}
|
|
1336
1662
|
|
|
1337
1663
|
// dist/core/search/cache.js
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
const batchSizeCandidate = settings.search.embedding_batch_size;
|
|
1343
|
-
const timeoutMsCandidate = settings.search.embedding_timeout_ms;
|
|
1344
|
-
const maxRetriesCandidate = settings.search.scanner_max_batch_retries;
|
|
1345
|
-
const batchSize = Number.isFinite(batchSizeCandidate) && batchSizeCandidate > 0 ? Math.floor(batchSizeCandidate) : 1;
|
|
1346
|
-
const timeoutMs = Number.isFinite(timeoutMsCandidate) && timeoutMsCandidate > 0 ? Math.floor(timeoutMsCandidate) : 3e4;
|
|
1347
|
-
const maxRetries = Number.isFinite(maxRetriesCandidate) && maxRetriesCandidate >= 0 ? Math.floor(maxRetriesCandidate) : 0;
|
|
1348
|
-
return {
|
|
1349
|
-
batchSize,
|
|
1350
|
-
timeoutMs,
|
|
1351
|
-
maxRetries,
|
|
1352
|
-
maxBatchInputCharacters: Number.POSITIVE_INFINITY,
|
|
1353
|
-
maxInputCharacters
|
|
1354
|
-
};
|
|
1664
|
+
var SEARCH_CACHE_ARTIFACT_PATHS = ["index/manifest.json", "search/embeddings.jsonl"];
|
|
1665
|
+
var VECTORIZATION_STATUS_LEDGER_PATH = "search/vectorization-status.json";
|
|
1666
|
+
function formatInvalidationWarning(relativePath, error) {
|
|
1667
|
+
return `search_cache_invalidation_failed:${relativePath}:${String(error)}`;
|
|
1355
1668
|
}
|
|
1356
|
-
function
|
|
1357
|
-
|
|
1358
|
-
let currentBatch = [];
|
|
1359
|
-
let currentCharacters = 0;
|
|
1360
|
-
for (const input of inputs) {
|
|
1361
|
-
const wouldExceedCount = currentBatch.length >= batchSize;
|
|
1362
|
-
const wouldExceedCharacters = currentBatch.length > 0 && Number.isFinite(maxBatchInputCharacters) && currentCharacters + input.length > maxBatchInputCharacters;
|
|
1363
|
-
if (wouldExceedCount || wouldExceedCharacters) {
|
|
1364
|
-
batches.push(currentBatch);
|
|
1365
|
-
currentBatch = [];
|
|
1366
|
-
currentCharacters = 0;
|
|
1367
|
-
}
|
|
1368
|
-
currentBatch.push(input);
|
|
1369
|
-
currentCharacters += input.length;
|
|
1370
|
-
}
|
|
1371
|
-
batches.push(currentBatch);
|
|
1372
|
-
return batches;
|
|
1669
|
+
function toUniqueSorted(values) {
|
|
1670
|
+
return [...new Set([...values].map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
1373
1671
|
}
|
|
1374
|
-
function
|
|
1375
|
-
|
|
1376
|
-
return runtime;
|
|
1377
|
-
}
|
|
1378
|
-
return {
|
|
1379
|
-
...runtime,
|
|
1380
|
-
maxBatchInputCharacters: OLLAMA_SEMANTIC_CORPUS_INPUT_MAX_CHARACTERS
|
|
1381
|
-
};
|
|
1672
|
+
function isValidUpdatedAt(value) {
|
|
1673
|
+
return typeof value === "string" && value.trim().length > 0 && Number.isFinite(Date.parse(value));
|
|
1382
1674
|
}
|
|
1383
|
-
function
|
|
1384
|
-
|
|
1385
|
-
|
|
1675
|
+
function normalizeVectorizationLedgerEntries(entries) {
|
|
1676
|
+
const normalized = /* @__PURE__ */ new Map();
|
|
1677
|
+
for (const [rawId, rawUpdatedAt] of Object.entries(entries)) {
|
|
1678
|
+
const id = rawId.trim();
|
|
1679
|
+
if (id.length === 0 || !isValidUpdatedAt(rawUpdatedAt)) {
|
|
1680
|
+
continue;
|
|
1681
|
+
}
|
|
1682
|
+
normalized.set(id, rawUpdatedAt);
|
|
1386
1683
|
}
|
|
1387
|
-
|
|
1388
|
-
return `${input.slice(0, keepLength)}${SEMANTIC_CORPUS_TRUNCATION_SUFFIX}`.slice(0, maxInputCharacters);
|
|
1389
|
-
}
|
|
1390
|
-
function isEmbeddingTimeoutError(error) {
|
|
1391
|
-
const message = toErrorMessage(error).toLowerCase();
|
|
1392
|
-
return message.includes("timed out") || message.includes("timeout");
|
|
1393
|
-
}
|
|
1394
|
-
function buildEmbeddingFailureMessage(provider, batchLabel, batchSize, timeoutMs, attempts, error) {
|
|
1395
|
-
const base = `Embedding batch ${batchLabel} failed after ${attempts} attempt(s): ${toErrorMessage(error)}`;
|
|
1396
|
-
const details = `provider=${provider.name} model=${provider.model} batch_size=${batchSize} timeout_ms=${timeoutMs}`;
|
|
1397
|
-
if (!isEmbeddingTimeoutError(error)) {
|
|
1398
|
-
return `${base} (${details})`;
|
|
1399
|
-
}
|
|
1400
|
-
return `${base} (${details}; guidance=check provider availability or lower search.embedding_batch_size, raise search.embedding_timeout_ms, or run keyword search while semantic indexing catches up)`;
|
|
1401
|
-
}
|
|
1402
|
-
async function executeBatchWithAdaptiveSplit(provider, batch, batchLabel, timeoutMs, maxRetries, warnings) {
|
|
1403
|
-
let lastError = null;
|
|
1404
|
-
for (let attempt = 0; attempt <= maxRetries; attempt += 1) {
|
|
1405
|
-
try {
|
|
1406
|
-
const batchVectors = await executeEmbeddingRequest(provider, batch, { timeout_ms: timeoutMs });
|
|
1407
|
-
if (attempt > 0) {
|
|
1408
|
-
warnings.push(`search_embedding_batch_retry_succeeded:batch=${batchLabel}:attempt=${attempt + 1}:size=${batch.length}`);
|
|
1409
|
-
}
|
|
1410
|
-
return batchVectors;
|
|
1411
|
-
} catch (error) {
|
|
1412
|
-
lastError = error;
|
|
1413
|
-
if (isEmbeddingTimeoutError(error) && batch.length > 1) {
|
|
1414
|
-
const midpoint = Math.ceil(batch.length / 2);
|
|
1415
|
-
const left = batch.slice(0, midpoint);
|
|
1416
|
-
const right = batch.slice(midpoint);
|
|
1417
|
-
warnings.push(`search_embedding_batch_split_after_timeout:batch=${batchLabel}:size=${batch.length}:parts=${left.length}|${right.length}`);
|
|
1418
|
-
return [
|
|
1419
|
-
...await executeBatchWithAdaptiveSplit(provider, left, `${batchLabel}.1`, timeoutMs, maxRetries, warnings),
|
|
1420
|
-
...await executeBatchWithAdaptiveSplit(provider, right, `${batchLabel}.2`, timeoutMs, maxRetries, warnings)
|
|
1421
|
-
];
|
|
1422
|
-
}
|
|
1423
|
-
if (attempt < maxRetries) {
|
|
1424
|
-
const delayMs = Math.min(1e3 * 2 ** attempt, 8e3);
|
|
1425
|
-
await new Promise((resolve2) => setTimeout(resolve2, delayMs));
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
throw new Error(buildEmbeddingFailureMessage(provider, batchLabel, batch.length, timeoutMs, maxRetries + 1, lastError));
|
|
1430
|
-
}
|
|
1431
|
-
async function executeEmbeddingBatchesWithRetry(provider, settings, inputs, options = {}) {
|
|
1432
|
-
if (inputs.length === 0) {
|
|
1433
|
-
return {
|
|
1434
|
-
vectors: [],
|
|
1435
|
-
warnings: []
|
|
1436
|
-
};
|
|
1437
|
-
}
|
|
1438
|
-
const warnings = [];
|
|
1439
|
-
const corpusLimitResolution = resolveSemanticCorpusCharacterLimit(provider.name, settings.search.embedding_corpus_max_characters);
|
|
1440
|
-
if (corpusLimitResolution.warning) {
|
|
1441
|
-
warnings.push(corpusLimitResolution.warning);
|
|
1442
|
-
}
|
|
1443
|
-
const runtime = resolveProviderBatchRuntime(provider, resolveBatchRuntime(settings, corpusLimitResolution.maxCharacters));
|
|
1444
|
-
let truncatedInputCount = 0;
|
|
1445
|
-
const normalizedInputs = inputs.map((input) => {
|
|
1446
|
-
const normalized = truncateInputForRuntime(input, runtime.maxInputCharacters);
|
|
1447
|
-
if (normalized.length < input.length) {
|
|
1448
|
-
truncatedInputCount += 1;
|
|
1449
|
-
}
|
|
1450
|
-
return normalized;
|
|
1451
|
-
});
|
|
1452
|
-
if (truncatedInputCount > 0) {
|
|
1453
|
-
warnings.push(`search_embedding_input_truncated:count=${truncatedInputCount}:max_characters=${runtime.maxInputCharacters}`);
|
|
1454
|
-
}
|
|
1455
|
-
const batches = createBatches(normalizedInputs, runtime.batchSize, runtime.maxBatchInputCharacters);
|
|
1456
|
-
const vectors = [];
|
|
1457
|
-
let completedInputs = 0;
|
|
1458
|
-
for (let batchIndex = 0; batchIndex < batches.length; batchIndex += 1) {
|
|
1459
|
-
const batch = batches[batchIndex];
|
|
1460
|
-
options.onProgress?.({
|
|
1461
|
-
batch_index: batchIndex + 1,
|
|
1462
|
-
batch_total: batches.length,
|
|
1463
|
-
batch_size: batch.length,
|
|
1464
|
-
completed_inputs: completedInputs,
|
|
1465
|
-
total_inputs: normalizedInputs.length,
|
|
1466
|
-
phase: "start"
|
|
1467
|
-
});
|
|
1468
|
-
vectors.push(...await executeBatchWithAdaptiveSplit(provider, batch, String(batchIndex + 1), runtime.timeoutMs, runtime.maxRetries, warnings));
|
|
1469
|
-
completedInputs += batch.length;
|
|
1470
|
-
options.onProgress?.({
|
|
1471
|
-
batch_index: batchIndex + 1,
|
|
1472
|
-
batch_total: batches.length,
|
|
1473
|
-
batch_size: batch.length,
|
|
1474
|
-
completed_inputs: completedInputs,
|
|
1475
|
-
total_inputs: normalizedInputs.length,
|
|
1476
|
-
phase: "complete"
|
|
1477
|
-
});
|
|
1478
|
-
}
|
|
1479
|
-
return {
|
|
1480
|
-
vectors,
|
|
1481
|
-
warnings
|
|
1482
|
-
};
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
// dist/core/search/background-refresh.js
|
|
1486
|
-
import { spawn } from "node:child_process";
|
|
1487
|
-
import { mkdirSync, rmSync, statSync } from "node:fs";
|
|
1488
|
-
import path from "node:path";
|
|
1489
|
-
var REINDEX_LOCK_ID = "reindex";
|
|
1490
|
-
var PENDING_QUEUE_REL_PATH = "search/pending-refresh.json";
|
|
1491
|
-
var PENDING_QUEUE_GATE_REL_PATH = "search/pending-refresh.gate.lock";
|
|
1492
|
-
var PENDING_QUEUE_GATE_STALE_MS = 3e4;
|
|
1493
|
-
var SEARCH_REFRESH_INLINE_ENV = "PM_SEARCH_REFRESH_INLINE";
|
|
1494
|
-
var SEARCH_REFRESH_CHILD_ENV = "PM_SEARCH_REFRESH_CHILD";
|
|
1495
|
-
function parseBooleanTrueLike(value) {
|
|
1496
|
-
if (typeof value !== "string") {
|
|
1497
|
-
return false;
|
|
1498
|
-
}
|
|
1499
|
-
const normalized = value.trim().toLowerCase();
|
|
1500
|
-
return normalized === "1" || normalized === "true" || normalized === "yes" || normalized === "on";
|
|
1501
|
-
}
|
|
1502
|
-
function shouldRunSearchRefreshInForeground() {
|
|
1503
|
-
if (parseBooleanTrueLike(process.env[SEARCH_REFRESH_INLINE_ENV])) {
|
|
1504
|
-
return true;
|
|
1505
|
-
}
|
|
1506
|
-
if (parseBooleanTrueLike(process.env[SEARCH_REFRESH_CHILD_ENV])) {
|
|
1507
|
-
return true;
|
|
1508
|
-
}
|
|
1509
|
-
const nodeEnv = (process.env.NODE_ENV ?? "").trim().toLowerCase();
|
|
1510
|
-
return typeof process.env.VITEST === "string" || typeof process.env.VITEST_WORKER_ID === "string" || nodeEnv === "test";
|
|
1511
|
-
}
|
|
1512
|
-
function pendingQueuePath(pmRoot) {
|
|
1513
|
-
return path.join(pmRoot, PENDING_QUEUE_REL_PATH);
|
|
1514
|
-
}
|
|
1515
|
-
function pendingQueueGatePath(pmRoot) {
|
|
1516
|
-
return path.join(pmRoot, PENDING_QUEUE_GATE_REL_PATH);
|
|
1517
|
-
}
|
|
1518
|
-
function acquireQueueGate(pmRoot) {
|
|
1519
|
-
const gatePath = pendingQueueGatePath(pmRoot);
|
|
1520
|
-
try {
|
|
1521
|
-
if (Date.now() - statSync(gatePath).mtimeMs < PENDING_QUEUE_GATE_STALE_MS) {
|
|
1522
|
-
return false;
|
|
1523
|
-
}
|
|
1524
|
-
rmSync(gatePath, { recursive: true, force: true });
|
|
1525
|
-
} catch {
|
|
1526
|
-
}
|
|
1527
|
-
try {
|
|
1528
|
-
mkdirSync(path.dirname(gatePath), { recursive: true });
|
|
1529
|
-
mkdirSync(gatePath);
|
|
1530
|
-
return true;
|
|
1531
|
-
} catch {
|
|
1532
|
-
return false;
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
function releaseQueueGate(pmRoot) {
|
|
1536
|
-
try {
|
|
1537
|
-
rmSync(pendingQueueGatePath(pmRoot), { recursive: true, force: true });
|
|
1538
|
-
} catch {
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
async function withQueueGate(pmRoot, fn, fallback) {
|
|
1542
|
-
for (let attempt = 0; attempt < 50; attempt += 1) {
|
|
1543
|
-
if (acquireQueueGate(pmRoot)) {
|
|
1544
|
-
try {
|
|
1545
|
-
return await fn();
|
|
1546
|
-
} finally {
|
|
1547
|
-
releaseQueueGate(pmRoot);
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
await delay(20);
|
|
1551
|
-
}
|
|
1552
|
-
return fallback;
|
|
1553
|
-
}
|
|
1554
|
-
function delay(ms) {
|
|
1555
|
-
return new Promise((resolve2) => {
|
|
1556
|
-
setTimeout(resolve2, ms);
|
|
1557
|
-
});
|
|
1558
|
-
}
|
|
1559
|
-
async function readPendingQueueIds(pmRoot) {
|
|
1560
|
-
const raw = await readFileIfExists(pendingQueuePath(pmRoot));
|
|
1561
|
-
if (!raw || raw.trim().length === 0) {
|
|
1562
|
-
return [];
|
|
1563
|
-
}
|
|
1564
|
-
try {
|
|
1565
|
-
const parsed = JSON.parse(raw);
|
|
1566
|
-
if (!Array.isArray(parsed.ids)) {
|
|
1567
|
-
return [];
|
|
1568
|
-
}
|
|
1569
|
-
return parsed.ids.filter((id) => typeof id === "string" && id.length > 0);
|
|
1570
|
-
} catch {
|
|
1571
|
-
return [];
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
async function writePendingQueueIds(pmRoot, ids) {
|
|
1575
|
-
await writeFileAtomic(pendingQueuePath(pmRoot), `${JSON.stringify({ ids })}
|
|
1576
|
-
`);
|
|
1577
|
-
}
|
|
1578
|
-
async function enqueuePendingRefreshIds(pmRoot, itemIds) {
|
|
1579
|
-
const incoming = itemIds.filter((id) => typeof id === "string" && id.trim().length > 0);
|
|
1580
|
-
if (incoming.length === 0) {
|
|
1581
|
-
return;
|
|
1582
|
-
}
|
|
1583
|
-
const mergeIncoming = async () => {
|
|
1584
|
-
const existing = await readPendingQueueIds(pmRoot);
|
|
1585
|
-
const merged = [.../* @__PURE__ */ new Set([...existing, ...incoming])].sort((left, right) => left.localeCompare(right));
|
|
1586
|
-
await writePendingQueueIds(pmRoot, merged);
|
|
1587
|
-
};
|
|
1588
|
-
const gated = await withQueueGate(pmRoot, async () => {
|
|
1589
|
-
await mergeIncoming();
|
|
1590
|
-
return true;
|
|
1591
|
-
}, false);
|
|
1592
|
-
if (!gated) {
|
|
1593
|
-
await mergeIncoming();
|
|
1594
|
-
}
|
|
1595
|
-
}
|
|
1596
|
-
function searchRefreshRunnerPath() {
|
|
1597
|
-
return path.join(resolvePmPackageRootFromModule(import.meta.url, ["../../.."]), "dist", "cli", "search-refresh.js");
|
|
1598
|
-
}
|
|
1599
|
-
function dispatchRefreshChild(pmRoot) {
|
|
1600
|
-
try {
|
|
1601
|
-
const child = spawn(process.execPath, [searchRefreshRunnerPath()], {
|
|
1602
|
-
detached: true,
|
|
1603
|
-
stdio: "ignore",
|
|
1604
|
-
env: {
|
|
1605
|
-
...process.env,
|
|
1606
|
-
PM_PATH: pmRoot,
|
|
1607
|
-
[SEARCH_REFRESH_CHILD_ENV]: "1"
|
|
1608
|
-
}
|
|
1609
|
-
});
|
|
1610
|
-
child.on("error", () => {
|
|
1611
|
-
});
|
|
1612
|
-
child.unref();
|
|
1613
|
-
} catch {
|
|
1614
|
-
}
|
|
1615
|
-
}
|
|
1616
|
-
async function scheduleBackgroundSemanticRefresh(pmRoot, itemIds) {
|
|
1617
|
-
await enqueuePendingRefreshIds(pmRoot, itemIds);
|
|
1618
|
-
dispatchRefreshChild(pmRoot);
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
// dist/core/search/cache.js
|
|
1622
|
-
var SEARCH_CACHE_ARTIFACT_PATHS = ["index/manifest.json", "search/embeddings.jsonl"];
|
|
1623
|
-
var VECTORIZATION_STATUS_LEDGER_PATH = "search/vectorization-status.json";
|
|
1624
|
-
function formatInvalidationWarning(relativePath, error) {
|
|
1625
|
-
return `search_cache_invalidation_failed:${relativePath}:${String(error)}`;
|
|
1626
|
-
}
|
|
1627
|
-
function toUniqueSorted(values) {
|
|
1628
|
-
return [...new Set([...values].map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
|
|
1629
|
-
}
|
|
1630
|
-
function isValidUpdatedAt(value) {
|
|
1631
|
-
return typeof value === "string" && value.trim().length > 0 && Number.isFinite(Date.parse(value));
|
|
1632
|
-
}
|
|
1633
|
-
function normalizeVectorizationLedgerEntries(entries) {
|
|
1634
|
-
const normalized = /* @__PURE__ */ new Map();
|
|
1635
|
-
for (const [rawId, rawUpdatedAt] of Object.entries(entries)) {
|
|
1636
|
-
const id = rawId.trim();
|
|
1637
|
-
if (id.length === 0 || !isValidUpdatedAt(rawUpdatedAt)) {
|
|
1638
|
-
continue;
|
|
1639
|
-
}
|
|
1640
|
-
normalized.set(id, rawUpdatedAt);
|
|
1641
|
-
}
|
|
1642
|
-
return Object.fromEntries([...normalized.entries()].sort((left, right) => left[0].localeCompare(right[0])));
|
|
1684
|
+
return Object.fromEntries([...normalized.entries()].sort((left, right) => left[0].localeCompare(right[0])));
|
|
1643
1685
|
}
|
|
1644
1686
|
async function readVectorizationStatusLedger(pmRoot) {
|
|
1645
1687
|
const ledgerPath = path2.join(pmRoot, VECTORIZATION_STATUS_LEDGER_PATH);
|
|
@@ -1757,7 +1799,7 @@ async function resolveSemanticRefreshRuntimeContext(pmRoot, normalizedItemIds, o
|
|
|
1757
1799
|
if (!provider) {
|
|
1758
1800
|
return buildSkippedSemanticRefreshResult(normalizedItemIds, "search_semantic_refresh_skipped:provider_unconfigured");
|
|
1759
1801
|
}
|
|
1760
|
-
const vectorStore = resolveVectorStores(effectiveSettings).active;
|
|
1802
|
+
const vectorStore = resolveVectorStores(effectiveSettings, pmRoot).active;
|
|
1761
1803
|
if (!vectorStore) {
|
|
1762
1804
|
return buildSkippedSemanticRefreshResult(normalizedItemIds, "search_semantic_refresh_skipped:vector_store_unconfigured");
|
|
1763
1805
|
}
|
|
@@ -2011,6 +2053,763 @@ async function refreshSearchArtifactsForMutation(pmRoot, itemIds, options = {})
|
|
|
2011
2053
|
};
|
|
2012
2054
|
}
|
|
2013
2055
|
|
|
2056
|
+
// dist/cli/registration-helpers.js
|
|
2057
|
+
var RESOLVED_GLOBAL_OPTIONS = /* @__PURE__ */ Symbol("pm.resolvedGlobalOptions");
|
|
2058
|
+
function commandOptionsReader(command) {
|
|
2059
|
+
return typeof command === "object" && command !== null ? command : {};
|
|
2060
|
+
}
|
|
2061
|
+
function resolveCommanderContract(contracts, target) {
|
|
2062
|
+
const contract = contracts.find((entry) => entry.target === target);
|
|
2063
|
+
return contract ?? { target, keys: [target] };
|
|
2064
|
+
}
|
|
2065
|
+
function setResolvedGlobalOptions(command, globalOptions) {
|
|
2066
|
+
command[RESOLVED_GLOBAL_OPTIONS] = { ...globalOptions };
|
|
2067
|
+
}
|
|
2068
|
+
function clearResolvedGlobalOptions(command) {
|
|
2069
|
+
delete command[RESOLVED_GLOBAL_OPTIONS];
|
|
2070
|
+
}
|
|
2071
|
+
function getGlobalOptions(command) {
|
|
2072
|
+
const resolved = command[RESOLVED_GLOBAL_OPTIONS];
|
|
2073
|
+
if (resolved) {
|
|
2074
|
+
return { ...resolved };
|
|
2075
|
+
}
|
|
2076
|
+
const reader = commandOptionsReader(command);
|
|
2077
|
+
const opts = typeof reader.optsWithGlobals === "function" ? reader.optsWithGlobals() : typeof reader.opts === "function" ? reader.opts() : {};
|
|
2078
|
+
return {
|
|
2079
|
+
json: opts.json === true ? true : void 0,
|
|
2080
|
+
quiet: Boolean(opts.quiet),
|
|
2081
|
+
noChangedFields: opts.changedFields === false,
|
|
2082
|
+
idOnly: opts.idOnly === true,
|
|
2083
|
+
path: typeof opts.pmPath === "string" ? opts.pmPath : typeof opts.path === "string" ? opts.path : void 0,
|
|
2084
|
+
noExtensions: opts.extensions === false,
|
|
2085
|
+
noPager: Boolean(opts.noPager),
|
|
2086
|
+
profile: Boolean(opts.profile)
|
|
2087
|
+
};
|
|
2088
|
+
}
|
|
2089
|
+
function getCommandPath(command) {
|
|
2090
|
+
const parts = [];
|
|
2091
|
+
let current = command;
|
|
2092
|
+
while (current?.parent) {
|
|
2093
|
+
parts.unshift(current.name());
|
|
2094
|
+
current = current.parent;
|
|
2095
|
+
}
|
|
2096
|
+
return parts.join(" ");
|
|
2097
|
+
}
|
|
2098
|
+
async function applyDefaultOutputFormat(globalOptions) {
|
|
2099
|
+
if (globalOptions.json === true) {
|
|
2100
|
+
return globalOptions;
|
|
2101
|
+
}
|
|
2102
|
+
const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);
|
|
2103
|
+
if (!await pathExists(getSettingsPath(pmRoot))) {
|
|
2104
|
+
return globalOptions;
|
|
2105
|
+
}
|
|
2106
|
+
const settings = await readSettings(pmRoot);
|
|
2107
|
+
return {
|
|
2108
|
+
...globalOptions,
|
|
2109
|
+
defaultOutputFormat: settings.output.default_format
|
|
2110
|
+
};
|
|
2111
|
+
}
|
|
2112
|
+
function collect(value, previous) {
|
|
2113
|
+
const next = previous ?? [];
|
|
2114
|
+
next.push(value);
|
|
2115
|
+
return next;
|
|
2116
|
+
}
|
|
2117
|
+
function pushOptionalValueFlag(args, flag, value) {
|
|
2118
|
+
if (typeof value !== "string") {
|
|
2119
|
+
return;
|
|
2120
|
+
}
|
|
2121
|
+
const trimmed = value.trim();
|
|
2122
|
+
if (trimmed.length === 0) {
|
|
2123
|
+
return;
|
|
2124
|
+
}
|
|
2125
|
+
args.push(flag, trimmed);
|
|
2126
|
+
}
|
|
2127
|
+
function pushOptionalBooleanFlag(args, flag, value) {
|
|
2128
|
+
if (value === true) {
|
|
2129
|
+
args.push(flag);
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
function pushRepeatableValueFlag(args, flag, values) {
|
|
2133
|
+
if (!Array.isArray(values)) {
|
|
2134
|
+
return;
|
|
2135
|
+
}
|
|
2136
|
+
for (const value of values) {
|
|
2137
|
+
if (typeof value !== "string") {
|
|
2138
|
+
continue;
|
|
2139
|
+
}
|
|
2140
|
+
const trimmed = value.trim();
|
|
2141
|
+
if (trimmed.length === 0) {
|
|
2142
|
+
continue;
|
|
2143
|
+
}
|
|
2144
|
+
args.push(flag, trimmed);
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
function optionTrue(options, key) {
|
|
2148
|
+
return options[key] === true ? true : void 0;
|
|
2149
|
+
}
|
|
2150
|
+
function optionFalse(options, key) {
|
|
2151
|
+
return options[key] === false ? true : void 0;
|
|
2152
|
+
}
|
|
2153
|
+
function readOptionString(options, key) {
|
|
2154
|
+
return typeof options[key] === "string" ? options[key] : void 0;
|
|
2155
|
+
}
|
|
2156
|
+
function addHiddenOption(command, flags, description) {
|
|
2157
|
+
command.addOption(new Option(flags, description).hideHelp());
|
|
2158
|
+
}
|
|
2159
|
+
function anyOptionTrue(options, keys) {
|
|
2160
|
+
return keys.some((key) => options[key] === true) ? true : void 0;
|
|
2161
|
+
}
|
|
2162
|
+
function copyUnknownOptions(target, source) {
|
|
2163
|
+
for (const [key, value] of Object.entries(source)) {
|
|
2164
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
2165
|
+
continue;
|
|
2166
|
+
}
|
|
2167
|
+
if (Object.hasOwn(target, key)) {
|
|
2168
|
+
continue;
|
|
2169
|
+
}
|
|
2170
|
+
target[key] = value;
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
function buildBackgroundTestCommandArgs(id, options) {
|
|
2174
|
+
const args = ["test", id, "--run", "--json", "--progress"];
|
|
2175
|
+
pushRepeatableValueFlag(args, "--add", options.add);
|
|
2176
|
+
pushRepeatableValueFlag(args, "--add-json", options.addJson);
|
|
2177
|
+
pushRepeatableValueFlag(args, "--remove", options.remove);
|
|
2178
|
+
pushOptionalValueFlag(args, "--match", options.match);
|
|
2179
|
+
pushOptionalValueFlag(args, "--only-index", options.onlyIndex);
|
|
2180
|
+
pushOptionalBooleanFlag(args, "--only-last", options.onlyLast);
|
|
2181
|
+
pushOptionalValueFlag(args, "--timeout", options.timeout);
|
|
2182
|
+
pushRepeatableValueFlag(args, "--env-set", options.envSet);
|
|
2183
|
+
pushRepeatableValueFlag(args, "--env-clear", options.envClear);
|
|
2184
|
+
pushOptionalBooleanFlag(args, "--shared-host-safe", options.sharedHostSafe);
|
|
2185
|
+
pushOptionalValueFlag(args, "--pm-context", options.pmContext);
|
|
2186
|
+
pushOptionalBooleanFlag(args, "--override-linked-pm-context", options.overrideLinkedPmContext);
|
|
2187
|
+
pushOptionalBooleanFlag(args, "--fail-on-context-mismatch", options.failOnContextMismatch);
|
|
2188
|
+
pushOptionalBooleanFlag(args, "--fail-on-skipped", options.failOnSkipped);
|
|
2189
|
+
pushOptionalBooleanFlag(args, "--fail-on-empty-test-run", options.failOnEmptyTestRun);
|
|
2190
|
+
pushOptionalBooleanFlag(args, "--require-assertions-for-pm", options.requireAssertionsForPm);
|
|
2191
|
+
pushOptionalBooleanFlag(args, "--check-context", options.checkContext);
|
|
2192
|
+
pushOptionalBooleanFlag(args, "--auto-pm-context", options.autoPmContext);
|
|
2193
|
+
pushOptionalValueFlag(args, "--author", options.author);
|
|
2194
|
+
pushOptionalValueFlag(args, "--message", options.message);
|
|
2195
|
+
pushOptionalBooleanFlag(args, "--force", options.force);
|
|
2196
|
+
return args;
|
|
2197
|
+
}
|
|
2198
|
+
function buildBackgroundTestAllCommandArgs(options) {
|
|
2199
|
+
const args = ["test-all", "--json", "--progress"];
|
|
2200
|
+
pushOptionalValueFlag(args, "--status", options.status);
|
|
2201
|
+
pushOptionalValueFlag(args, "--limit", options.limit);
|
|
2202
|
+
pushOptionalValueFlag(args, "--offset", options.offset);
|
|
2203
|
+
pushOptionalValueFlag(args, "--timeout", options.timeout);
|
|
2204
|
+
pushRepeatableValueFlag(args, "--env-set", options.envSet);
|
|
2205
|
+
pushRepeatableValueFlag(args, "--env-clear", options.envClear);
|
|
2206
|
+
pushOptionalBooleanFlag(args, "--shared-host-safe", options.sharedHostSafe);
|
|
2207
|
+
pushOptionalValueFlag(args, "--pm-context", options.pmContext);
|
|
2208
|
+
pushOptionalBooleanFlag(args, "--override-linked-pm-context", options.overrideLinkedPmContext);
|
|
2209
|
+
pushOptionalBooleanFlag(args, "--fail-on-context-mismatch", options.failOnContextMismatch);
|
|
2210
|
+
pushOptionalBooleanFlag(args, "--fail-on-skipped", options.failOnSkipped);
|
|
2211
|
+
pushOptionalBooleanFlag(args, "--fail-on-empty-test-run", options.failOnEmptyTestRun);
|
|
2212
|
+
pushOptionalBooleanFlag(args, "--require-assertions-for-pm", options.requireAssertionsForPm);
|
|
2213
|
+
pushOptionalBooleanFlag(args, "--check-context", options.checkContext);
|
|
2214
|
+
pushOptionalBooleanFlag(args, "--auto-pm-context", options.autoPmContext);
|
|
2215
|
+
return args;
|
|
2216
|
+
}
|
|
2217
|
+
function formatHookWarnings(warnings) {
|
|
2218
|
+
return warnings.join(",");
|
|
2219
|
+
}
|
|
2220
|
+
function normalizeCreateOptions(commandOptions, options = {}) {
|
|
2221
|
+
const readCreateString = (target) => readFirstStringFromCommanderOptions(commandOptions, resolveCommanderContract(CREATE_COMMANDER_STRING_OPTION_CONTRACTS, target));
|
|
2222
|
+
const readCreateList = (target) => readStringArrayFromCommanderOptions(commandOptions, resolveCommanderContract(CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, target));
|
|
2223
|
+
const type = readCreateString("type");
|
|
2224
|
+
if (options.requireType !== false && type === void 0) {
|
|
2225
|
+
throw new PmCliError("Missing required option --type <value>. Why required: create resolves runtime schema fields/workflow from item type. Retry: add --type <built-in or configured custom type> (example: --type Task).", EXIT_CODE.USAGE);
|
|
2226
|
+
}
|
|
2227
|
+
const normalized = {
|
|
2228
|
+
title: readCreateString("title"),
|
|
2229
|
+
description: readCreateString("description"),
|
|
2230
|
+
type,
|
|
2231
|
+
template: readCreateString("template"),
|
|
2232
|
+
createMode: readCreateString("createMode"),
|
|
2233
|
+
schedulePreset: readCreateString("schedulePreset"),
|
|
2234
|
+
status: readCreateString("status"),
|
|
2235
|
+
priority: readCreateString("priority"),
|
|
2236
|
+
tags: readCreateString("tags"),
|
|
2237
|
+
addTags: readCreateList("addTags"),
|
|
2238
|
+
body: readCreateString("body"),
|
|
2239
|
+
deadline: readCreateString("deadline"),
|
|
2240
|
+
estimatedMinutes: readCreateString("estimatedMinutes"),
|
|
2241
|
+
acceptanceCriteria: readCreateString("acceptanceCriteria"),
|
|
2242
|
+
definitionOfReady: readCreateString("definitionOfReady"),
|
|
2243
|
+
order: readCreateString("order"),
|
|
2244
|
+
rank: readCreateString("rank"),
|
|
2245
|
+
goal: readCreateString("goal"),
|
|
2246
|
+
objective: readCreateString("objective"),
|
|
2247
|
+
value: readCreateString("value"),
|
|
2248
|
+
impact: readCreateString("impact"),
|
|
2249
|
+
outcome: readCreateString("outcome"),
|
|
2250
|
+
whyNow: readCreateString("whyNow"),
|
|
2251
|
+
author: readCreateString("author"),
|
|
2252
|
+
message: readCreateString("message"),
|
|
2253
|
+
assignee: readCreateString("assignee"),
|
|
2254
|
+
parent: readCreateString("parent"),
|
|
2255
|
+
allowMissingParent: optionTrue(commandOptions, "allowMissingParent") === true,
|
|
2256
|
+
reviewer: readCreateString("reviewer"),
|
|
2257
|
+
risk: readCreateString("risk"),
|
|
2258
|
+
confidence: readCreateString("confidence"),
|
|
2259
|
+
sprint: readCreateString("sprint"),
|
|
2260
|
+
release: readCreateString("release"),
|
|
2261
|
+
blockedBy: readCreateString("blockedBy"),
|
|
2262
|
+
blockedReason: readCreateString("blockedReason"),
|
|
2263
|
+
unblockNote: readCreateString("unblockNote"),
|
|
2264
|
+
reporter: readCreateString("reporter"),
|
|
2265
|
+
severity: readCreateString("severity"),
|
|
2266
|
+
environment: readCreateString("environment"),
|
|
2267
|
+
reproSteps: readCreateString("reproSteps"),
|
|
2268
|
+
resolution: readCreateString("resolution"),
|
|
2269
|
+
expectedResult: readCreateString("expectedResult"),
|
|
2270
|
+
actualResult: readCreateString("actualResult"),
|
|
2271
|
+
affectedVersion: readCreateString("affectedVersion"),
|
|
2272
|
+
fixedVersion: readCreateString("fixedVersion"),
|
|
2273
|
+
component: readCreateString("component"),
|
|
2274
|
+
regression: readCreateString("regression"),
|
|
2275
|
+
customerImpact: readCreateString("customerImpact"),
|
|
2276
|
+
dep: readCreateList("dep"),
|
|
2277
|
+
comment: readCreateList("comment"),
|
|
2278
|
+
note: readCreateList("note"),
|
|
2279
|
+
learning: readCreateList("learning"),
|
|
2280
|
+
file: readCreateList("file"),
|
|
2281
|
+
test: readCreateList("test"),
|
|
2282
|
+
doc: readCreateList("doc"),
|
|
2283
|
+
reminder: readCreateList("reminder"),
|
|
2284
|
+
event: readCreateList("event"),
|
|
2285
|
+
typeOption: readCreateList("typeOption"),
|
|
2286
|
+
field: readCreateList("field"),
|
|
2287
|
+
unset: readCreateList("unset"),
|
|
2288
|
+
clearDeps: optionTrue(commandOptions, "clearDeps"),
|
|
2289
|
+
clearComments: optionTrue(commandOptions, "clearComments"),
|
|
2290
|
+
clearNotes: optionTrue(commandOptions, "clearNotes"),
|
|
2291
|
+
clearLearnings: optionTrue(commandOptions, "clearLearnings"),
|
|
2292
|
+
clearFiles: optionTrue(commandOptions, "clearFiles"),
|
|
2293
|
+
clearTests: optionTrue(commandOptions, "clearTests"),
|
|
2294
|
+
clearDocs: optionTrue(commandOptions, "clearDocs"),
|
|
2295
|
+
clearReminders: optionTrue(commandOptions, "clearReminders"),
|
|
2296
|
+
clearEvents: optionTrue(commandOptions, "clearEvents"),
|
|
2297
|
+
clearTypeOptions: optionTrue(commandOptions, "clearTypeOptions")
|
|
2298
|
+
};
|
|
2299
|
+
copyUnknownOptions(normalized, commandOptions);
|
|
2300
|
+
return normalized;
|
|
2301
|
+
}
|
|
2302
|
+
function normalizeUpdateOptions(commandOptions) {
|
|
2303
|
+
const readUpdateString = (target) => readFirstStringFromCommanderOptions(commandOptions, resolveCommanderContract(UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, target));
|
|
2304
|
+
const readUpdateList = (target) => readStringArrayFromCommanderOptions(commandOptions, resolveCommanderContract(UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, target));
|
|
2305
|
+
const normalized = {
|
|
2306
|
+
title: readUpdateString("title"),
|
|
2307
|
+
description: readUpdateString("description"),
|
|
2308
|
+
body: readUpdateString("body"),
|
|
2309
|
+
status: readUpdateString("status"),
|
|
2310
|
+
closeReason: readUpdateString("closeReason"),
|
|
2311
|
+
priority: readUpdateString("priority"),
|
|
2312
|
+
type: readUpdateString("type"),
|
|
2313
|
+
tags: readUpdateString("tags"),
|
|
2314
|
+
addTags: readUpdateList("addTags"),
|
|
2315
|
+
removeTags: readUpdateList("removeTags"),
|
|
2316
|
+
deadline: readUpdateString("deadline"),
|
|
2317
|
+
estimatedMinutes: readUpdateString("estimatedMinutes"),
|
|
2318
|
+
acceptanceCriteria: readUpdateString("acceptanceCriteria"),
|
|
2319
|
+
definitionOfReady: readUpdateString("definitionOfReady"),
|
|
2320
|
+
order: readUpdateString("order"),
|
|
2321
|
+
rank: readUpdateString("rank"),
|
|
2322
|
+
goal: readUpdateString("goal"),
|
|
2323
|
+
objective: readUpdateString("objective"),
|
|
2324
|
+
value: readUpdateString("value"),
|
|
2325
|
+
impact: readUpdateString("impact"),
|
|
2326
|
+
outcome: readUpdateString("outcome"),
|
|
2327
|
+
whyNow: readUpdateString("whyNow"),
|
|
2328
|
+
author: readUpdateString("author"),
|
|
2329
|
+
message: readUpdateString("message"),
|
|
2330
|
+
force: Boolean(commandOptions.force),
|
|
2331
|
+
allowAuditUpdate: anyOptionTrue(commandOptions, ["allowAuditUpdate", "allow_audit_update"]),
|
|
2332
|
+
allowAuditDepUpdate: anyOptionTrue(commandOptions, ["allowAuditDepUpdate", "allow_audit_dep_update"]),
|
|
2333
|
+
assignee: readUpdateString("assignee"),
|
|
2334
|
+
parent: readUpdateString("parent"),
|
|
2335
|
+
reviewer: readUpdateString("reviewer"),
|
|
2336
|
+
risk: readUpdateString("risk"),
|
|
2337
|
+
confidence: readUpdateString("confidence"),
|
|
2338
|
+
sprint: readUpdateString("sprint"),
|
|
2339
|
+
release: readUpdateString("release"),
|
|
2340
|
+
blockedBy: readUpdateString("blockedBy"),
|
|
2341
|
+
blockedReason: readUpdateString("blockedReason"),
|
|
2342
|
+
unblockNote: readUpdateString("unblockNote"),
|
|
2343
|
+
reporter: readUpdateString("reporter"),
|
|
2344
|
+
severity: readUpdateString("severity"),
|
|
2345
|
+
environment: readUpdateString("environment"),
|
|
2346
|
+
reproSteps: readUpdateString("reproSteps"),
|
|
2347
|
+
resolution: readUpdateString("resolution"),
|
|
2348
|
+
expectedResult: readUpdateString("expectedResult"),
|
|
2349
|
+
actualResult: readUpdateString("actualResult"),
|
|
2350
|
+
affectedVersion: readUpdateString("affectedVersion"),
|
|
2351
|
+
fixedVersion: readUpdateString("fixedVersion"),
|
|
2352
|
+
component: readUpdateString("component"),
|
|
2353
|
+
regression: readUpdateString("regression"),
|
|
2354
|
+
customerImpact: readUpdateString("customerImpact"),
|
|
2355
|
+
dep: readUpdateList("dep"),
|
|
2356
|
+
depRemove: readUpdateList("depRemove"),
|
|
2357
|
+
replaceDeps: optionTrue(commandOptions, "replaceDeps"),
|
|
2358
|
+
replaceTests: optionTrue(commandOptions, "replaceTests"),
|
|
2359
|
+
comment: readUpdateList("comment"),
|
|
2360
|
+
note: readUpdateList("note"),
|
|
2361
|
+
learning: readUpdateList("learning"),
|
|
2362
|
+
file: readUpdateList("file"),
|
|
2363
|
+
test: readUpdateList("test"),
|
|
2364
|
+
doc: readUpdateList("doc"),
|
|
2365
|
+
reminder: readUpdateList("reminder"),
|
|
2366
|
+
event: readUpdateList("event"),
|
|
2367
|
+
typeOption: readUpdateList("typeOption"),
|
|
2368
|
+
field: readUpdateList("field"),
|
|
2369
|
+
unset: readUpdateList("unset"),
|
|
2370
|
+
clearDeps: optionTrue(commandOptions, "clearDeps"),
|
|
2371
|
+
clearComments: optionTrue(commandOptions, "clearComments"),
|
|
2372
|
+
clearNotes: optionTrue(commandOptions, "clearNotes"),
|
|
2373
|
+
clearLearnings: optionTrue(commandOptions, "clearLearnings"),
|
|
2374
|
+
clearFiles: optionTrue(commandOptions, "clearFiles"),
|
|
2375
|
+
clearTests: optionTrue(commandOptions, "clearTests"),
|
|
2376
|
+
clearDocs: optionTrue(commandOptions, "clearDocs"),
|
|
2377
|
+
clearReminders: optionTrue(commandOptions, "clearReminders"),
|
|
2378
|
+
clearEvents: optionTrue(commandOptions, "clearEvents"),
|
|
2379
|
+
clearTypeOptions: optionTrue(commandOptions, "clearTypeOptions")
|
|
2380
|
+
};
|
|
2381
|
+
copyUnknownOptions(normalized, commandOptions);
|
|
2382
|
+
return normalized;
|
|
2383
|
+
}
|
|
2384
|
+
var UPDATE_MANY_CONTROL_OPTION_KEYS = /* @__PURE__ */ new Set([
|
|
2385
|
+
"filterStatus",
|
|
2386
|
+
"filterType",
|
|
2387
|
+
"filterTag",
|
|
2388
|
+
"filterPriority",
|
|
2389
|
+
"filterDeadlineBefore",
|
|
2390
|
+
"filterDeadlineAfter",
|
|
2391
|
+
"filterUpdatedAfter",
|
|
2392
|
+
"filterUpdatedBefore",
|
|
2393
|
+
"filterCreatedAfter",
|
|
2394
|
+
"filterCreatedBefore",
|
|
2395
|
+
"filterAssignee",
|
|
2396
|
+
"filterAssigneeFilter",
|
|
2397
|
+
"filterAssignee_filter",
|
|
2398
|
+
"filterParent",
|
|
2399
|
+
"filterSprint",
|
|
2400
|
+
"filterRelease",
|
|
2401
|
+
"filterAcMissing",
|
|
2402
|
+
"filterEstimatesMissing",
|
|
2403
|
+
"filterEstimateMissing",
|
|
2404
|
+
"filterResolutionMissing",
|
|
2405
|
+
"filterMetadataMissing",
|
|
2406
|
+
"filterReviewerMissing",
|
|
2407
|
+
"filterRiskMissing",
|
|
2408
|
+
"filterConfidenceMissing",
|
|
2409
|
+
"filterSprintMissing",
|
|
2410
|
+
"filterReleaseMissing",
|
|
2411
|
+
"filterHasNotes",
|
|
2412
|
+
"filterNoNotes",
|
|
2413
|
+
"filterHasLearnings",
|
|
2414
|
+
"filterNoLearnings",
|
|
2415
|
+
"filterHasFiles",
|
|
2416
|
+
"filterNoFiles",
|
|
2417
|
+
"filterHasDocs",
|
|
2418
|
+
"filterNoDocs",
|
|
2419
|
+
"filterHasTests",
|
|
2420
|
+
"filterNoTests",
|
|
2421
|
+
"filterHasComments",
|
|
2422
|
+
"filterNoComments",
|
|
2423
|
+
"filterHasDeps",
|
|
2424
|
+
"filterNoDeps",
|
|
2425
|
+
"filterHasBody",
|
|
2426
|
+
"filterEmptyBody",
|
|
2427
|
+
"filterHasLinkedCommand",
|
|
2428
|
+
"filterNoLinkedCommand",
|
|
2429
|
+
"ids",
|
|
2430
|
+
"limit",
|
|
2431
|
+
"offset",
|
|
2432
|
+
"dryRun",
|
|
2433
|
+
"rollback",
|
|
2434
|
+
"checkpoint"
|
|
2435
|
+
]);
|
|
2436
|
+
function extractUpdateManyMutationOptionSource(commandOptions) {
|
|
2437
|
+
const mutationOptions = {};
|
|
2438
|
+
for (const [key, value] of Object.entries(commandOptions)) {
|
|
2439
|
+
if (UPDATE_MANY_CONTROL_OPTION_KEYS.has(key)) {
|
|
2440
|
+
continue;
|
|
2441
|
+
}
|
|
2442
|
+
mutationOptions[key] = value;
|
|
2443
|
+
}
|
|
2444
|
+
return mutationOptions;
|
|
2445
|
+
}
|
|
2446
|
+
function readListOptionString(options, target) {
|
|
2447
|
+
const contract = resolveCommanderContract(LIST_COMMANDER_STRING_OPTION_CONTRACTS, target);
|
|
2448
|
+
const stringValue = readFirstStringFromCommanderOptions(options, contract);
|
|
2449
|
+
if (stringValue !== void 0) {
|
|
2450
|
+
return stringValue;
|
|
2451
|
+
}
|
|
2452
|
+
for (const key of contract.keys) {
|
|
2453
|
+
const value = options[key];
|
|
2454
|
+
if (target === "ids" && typeof value === "string") {
|
|
2455
|
+
return value;
|
|
2456
|
+
}
|
|
2457
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
2458
|
+
return String(value);
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
return void 0;
|
|
2462
|
+
}
|
|
2463
|
+
function readSelectionFilterOptionFields(options) {
|
|
2464
|
+
const filterFilesMissing = optionTrue(options, "filterFilesMissing");
|
|
2465
|
+
const filterDocsMissing = optionTrue(options, "filterDocsMissing");
|
|
2466
|
+
return {
|
|
2467
|
+
filterReviewerMissing: optionTrue(options, "filterReviewerMissing"),
|
|
2468
|
+
filterRiskMissing: optionTrue(options, "filterRiskMissing"),
|
|
2469
|
+
filterConfidenceMissing: optionTrue(options, "filterConfidenceMissing"),
|
|
2470
|
+
filterSprintMissing: optionTrue(options, "filterSprintMissing"),
|
|
2471
|
+
filterReleaseMissing: optionTrue(options, "filterReleaseMissing"),
|
|
2472
|
+
hasNotes: optionTrue(options, "hasNotes"),
|
|
2473
|
+
hasLearnings: optionTrue(options, "hasLearnings"),
|
|
2474
|
+
hasFiles: optionTrue(options, "hasFiles"),
|
|
2475
|
+
hasDocs: optionTrue(options, "hasDocs"),
|
|
2476
|
+
hasTests: optionTrue(options, "hasTests"),
|
|
2477
|
+
hasComments: optionTrue(options, "hasComments"),
|
|
2478
|
+
hasDeps: optionTrue(options, "hasDeps"),
|
|
2479
|
+
hasBody: optionTrue(options, "hasBody"),
|
|
2480
|
+
hasLinkedCommand: optionTrue(options, "hasLinkedCommand"),
|
|
2481
|
+
noNotes: optionFalse(options, "notes"),
|
|
2482
|
+
noLearnings: optionFalse(options, "learnings"),
|
|
2483
|
+
noFiles: optionFalse(options, "files") ?? filterFilesMissing,
|
|
2484
|
+
filterFilesMissing,
|
|
2485
|
+
noDocs: optionFalse(options, "docs") ?? filterDocsMissing,
|
|
2486
|
+
filterDocsMissing,
|
|
2487
|
+
noTests: optionFalse(options, "tests"),
|
|
2488
|
+
noComments: optionFalse(options, "comments"),
|
|
2489
|
+
noDeps: optionFalse(options, "deps"),
|
|
2490
|
+
emptyBody: optionTrue(options, "emptyBody"),
|
|
2491
|
+
noLinkedCommand: optionFalse(options, "linkedCommand")
|
|
2492
|
+
};
|
|
2493
|
+
}
|
|
2494
|
+
function normalizeListOptions(options) {
|
|
2495
|
+
const normalized = {
|
|
2496
|
+
status: readListOptionString(options, "status"),
|
|
2497
|
+
type: readListOptionString(options, "type"),
|
|
2498
|
+
tag: readListOptionString(options, "tag"),
|
|
2499
|
+
priority: readListOptionString(options, "priority"),
|
|
2500
|
+
deadlineBefore: readListOptionString(options, "deadlineBefore"),
|
|
2501
|
+
deadlineAfter: readListOptionString(options, "deadlineAfter"),
|
|
2502
|
+
updatedAfter: readListOptionString(options, "updatedAfter"),
|
|
2503
|
+
updatedBefore: readListOptionString(options, "updatedBefore"),
|
|
2504
|
+
createdAfter: readListOptionString(options, "createdAfter"),
|
|
2505
|
+
createdBefore: readListOptionString(options, "createdBefore"),
|
|
2506
|
+
ids: readListOptionString(options, "ids"),
|
|
2507
|
+
assignee: readListOptionString(options, "assignee"),
|
|
2508
|
+
assigneeFilter: readListOptionString(options, "assigneeFilter"),
|
|
2509
|
+
parent: readListOptionString(options, "parent"),
|
|
2510
|
+
sprint: readListOptionString(options, "sprint"),
|
|
2511
|
+
release: readListOptionString(options, "release"),
|
|
2512
|
+
limit: readListOptionString(options, "limit"),
|
|
2513
|
+
offset: readListOptionString(options, "offset"),
|
|
2514
|
+
// Commander stores --no-truncate as truncate=false; --all is the positive alias.
|
|
2515
|
+
noTruncate: optionFalse(options, "truncate") ?? optionTrue(options, "all"),
|
|
2516
|
+
includeBody: optionTrue(options, "includeBody"),
|
|
2517
|
+
compact: optionTrue(options, "compact"),
|
|
2518
|
+
brief: optionTrue(options, "brief"),
|
|
2519
|
+
full: optionTrue(options, "full"),
|
|
2520
|
+
fields: readListOptionString(options, "fields"),
|
|
2521
|
+
sort: readListOptionString(options, "sort"),
|
|
2522
|
+
order: readListOptionString(options, "order"),
|
|
2523
|
+
tree: optionTrue(options, "tree"),
|
|
2524
|
+
treeDepth: readListOptionString(options, "treeDepth"),
|
|
2525
|
+
filterAcMissing: optionTrue(options, "filterAcMissing"),
|
|
2526
|
+
filterEstimatesMissing: anyOptionTrue(options, ["filterEstimatesMissing", "filterEstimateMissing"]),
|
|
2527
|
+
filterResolutionMissing: optionTrue(options, "filterResolutionMissing"),
|
|
2528
|
+
filterMetadataMissing: optionTrue(options, "filterMetadataMissing"),
|
|
2529
|
+
// Governance-missing (GH-236) + content presence/absence (GH-242) filters.
|
|
2530
|
+
...readSelectionFilterOptionFields(options)
|
|
2531
|
+
};
|
|
2532
|
+
copyUnknownOptions(normalized, options);
|
|
2533
|
+
return normalized;
|
|
2534
|
+
}
|
|
2535
|
+
function normalizeAggregateOptions(options) {
|
|
2536
|
+
return {
|
|
2537
|
+
groupBy: typeof options.groupBy === "string" ? options.groupBy : void 0,
|
|
2538
|
+
count: options.count === true ? true : void 0,
|
|
2539
|
+
completion: options.completion === true ? true : void 0,
|
|
2540
|
+
sum: typeof options.sum === "string" ? options.sum : void 0,
|
|
2541
|
+
avg: typeof options.avg === "string" ? options.avg : void 0,
|
|
2542
|
+
includeUnparented: options.includeUnparented === true || options.include_unparented === true,
|
|
2543
|
+
status: typeof options.status === "string" ? options.status : void 0,
|
|
2544
|
+
type: readListOptionString(options, "type"),
|
|
2545
|
+
tag: readListOptionString(options, "tag"),
|
|
2546
|
+
priority: readListOptionString(options, "priority"),
|
|
2547
|
+
deadlineBefore: readListOptionString(options, "deadlineBefore"),
|
|
2548
|
+
deadlineAfter: readListOptionString(options, "deadlineAfter"),
|
|
2549
|
+
assignee: readListOptionString(options, "assignee"),
|
|
2550
|
+
assigneeFilter: readListOptionString(options, "assigneeFilter"),
|
|
2551
|
+
parent: readListOptionString(options, "parent"),
|
|
2552
|
+
sprint: readListOptionString(options, "sprint"),
|
|
2553
|
+
release: readListOptionString(options, "release")
|
|
2554
|
+
};
|
|
2555
|
+
}
|
|
2556
|
+
function printListJsonStream(commandName, result, globalOptions) {
|
|
2557
|
+
setActiveCommandResult(result);
|
|
2558
|
+
if (globalOptions.quiet) {
|
|
2559
|
+
return;
|
|
2560
|
+
}
|
|
2561
|
+
const warnings = Array.isArray(result.warnings) ? result.warnings : [];
|
|
2562
|
+
const metaPayload = {
|
|
2563
|
+
type: "meta",
|
|
2564
|
+
command: commandName,
|
|
2565
|
+
count: result.count,
|
|
2566
|
+
now: result.now,
|
|
2567
|
+
filters: result.filters
|
|
2568
|
+
};
|
|
2569
|
+
if (warnings.length > 0) {
|
|
2570
|
+
metaPayload.warnings = warnings;
|
|
2571
|
+
}
|
|
2572
|
+
if (!writeStdout(`${JSON.stringify(metaPayload)}
|
|
2573
|
+
`)) {
|
|
2574
|
+
return;
|
|
2575
|
+
}
|
|
2576
|
+
for (const item of result.items) {
|
|
2577
|
+
if (!writeStdout(`${JSON.stringify({ type: "item", command: commandName, item })}
|
|
2578
|
+
`)) {
|
|
2579
|
+
return;
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
writeStdout(`${JSON.stringify({ type: "end", command: commandName, count: result.count })}
|
|
2583
|
+
`);
|
|
2584
|
+
}
|
|
2585
|
+
function printActivityJsonStream(result, options, globalOptions) {
|
|
2586
|
+
setActiveCommandResult(result);
|
|
2587
|
+
if (globalOptions.quiet) {
|
|
2588
|
+
return;
|
|
2589
|
+
}
|
|
2590
|
+
const metaPayload = {
|
|
2591
|
+
type: "meta",
|
|
2592
|
+
command: "activity",
|
|
2593
|
+
count: result.count,
|
|
2594
|
+
filters: {
|
|
2595
|
+
id: options.id ?? null,
|
|
2596
|
+
op: options.op ?? null,
|
|
2597
|
+
author: options.author ?? null,
|
|
2598
|
+
from: options.from ?? null,
|
|
2599
|
+
to: options.to ?? null,
|
|
2600
|
+
limit: options.limit ?? null
|
|
2601
|
+
}
|
|
2602
|
+
};
|
|
2603
|
+
if (!writeStdout(`${JSON.stringify(metaPayload)}
|
|
2604
|
+
`)) {
|
|
2605
|
+
return;
|
|
2606
|
+
}
|
|
2607
|
+
const entries = result.compact && result.compact_activity ? result.compact_activity : result.activity;
|
|
2608
|
+
for (const entry of entries) {
|
|
2609
|
+
if (!writeStdout(`${JSON.stringify({ type: "entry", command: "activity", entry })}
|
|
2610
|
+
`)) {
|
|
2611
|
+
return;
|
|
2612
|
+
}
|
|
2613
|
+
}
|
|
2614
|
+
writeStdout(`${JSON.stringify({ type: "end", command: "activity", count: result.count })}
|
|
2615
|
+
`);
|
|
2616
|
+
}
|
|
2617
|
+
function normalizeSearchOptions(options) {
|
|
2618
|
+
const readSearchString = (target) => readFirstStringFromCommanderOptions(options, resolveCommanderContract(SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, target));
|
|
2619
|
+
const readSearchStringOrNumber = (target) => {
|
|
2620
|
+
const candidate = readFirstValueFromCommanderOptions(options, resolveCommanderContract(SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, target));
|
|
2621
|
+
if (typeof candidate === "string") {
|
|
2622
|
+
return candidate;
|
|
2623
|
+
}
|
|
2624
|
+
if (typeof candidate === "number" && Number.isFinite(candidate)) {
|
|
2625
|
+
return candidate;
|
|
2626
|
+
}
|
|
2627
|
+
return void 0;
|
|
2628
|
+
};
|
|
2629
|
+
const fields = readSearchString("fields");
|
|
2630
|
+
const compactRequested = options.compact === true;
|
|
2631
|
+
const fullRequested = options.full === true;
|
|
2632
|
+
const defaultCompact = !compactRequested && !fullRequested && fields === void 0;
|
|
2633
|
+
const mode = options.semantic === true ? "semantic" : options.hybrid === true ? "hybrid" : readSearchString("mode");
|
|
2634
|
+
const normalized = {
|
|
2635
|
+
mode,
|
|
2636
|
+
matchMode: readSearchString("matchMode"),
|
|
2637
|
+
minScore: readSearchStringOrNumber("minScore"),
|
|
2638
|
+
count: optionTrue(options, "count"),
|
|
2639
|
+
semanticWeight: readSearchStringOrNumber("semanticWeight"),
|
|
2640
|
+
includeLinked: optionTrue(options, "includeLinked"),
|
|
2641
|
+
titleExact: optionTrue(options, "titleExact"),
|
|
2642
|
+
phraseExact: optionTrue(options, "phraseExact"),
|
|
2643
|
+
highlight: optionTrue(options, "highlight"),
|
|
2644
|
+
status: readSearchString("status"),
|
|
2645
|
+
type: readSearchString("type"),
|
|
2646
|
+
tag: readSearchString("tag"),
|
|
2647
|
+
priority: readSearchString("priority"),
|
|
2648
|
+
deadlineBefore: readSearchString("deadlineBefore"),
|
|
2649
|
+
deadlineAfter: readSearchString("deadlineAfter"),
|
|
2650
|
+
updatedAfter: readSearchString("updatedAfter"),
|
|
2651
|
+
updatedBefore: readSearchString("updatedBefore"),
|
|
2652
|
+
createdAfter: readSearchString("createdAfter"),
|
|
2653
|
+
createdBefore: readSearchString("createdBefore"),
|
|
2654
|
+
assignee: readSearchString("assignee"),
|
|
2655
|
+
sprint: readSearchString("sprint"),
|
|
2656
|
+
release: readSearchString("release"),
|
|
2657
|
+
parent: readSearchString("parent"),
|
|
2658
|
+
limit: readSearchString("limit"),
|
|
2659
|
+
fields,
|
|
2660
|
+
compact: compactRequested || defaultCompact ? true : void 0,
|
|
2661
|
+
full: optionTrue(options, "full"),
|
|
2662
|
+
// Governance-missing (GH-236) + content presence/absence (GH-242) filters,
|
|
2663
|
+
// mirroring normalizeListOptions via the shared field slice.
|
|
2664
|
+
...readSelectionFilterOptionFields(options)
|
|
2665
|
+
};
|
|
2666
|
+
copyUnknownOptions(normalized, options);
|
|
2667
|
+
return normalized;
|
|
2668
|
+
}
|
|
2669
|
+
function normalizeSearchKeywordsInput(keywords) {
|
|
2670
|
+
const query = keywords.map((entry) => entry.trim()).filter((entry) => entry.length > 0).join(" ");
|
|
2671
|
+
if (query.length === 0) {
|
|
2672
|
+
throw new PmCliError("Search query must not be empty", EXIT_CODE.USAGE);
|
|
2673
|
+
}
|
|
2674
|
+
return query;
|
|
2675
|
+
}
|
|
2676
|
+
function normalizeActivityOptions(options) {
|
|
2677
|
+
const readActivityString = (target) => readFirstStringFromCommanderOptions(options, resolveCommanderContract(ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, target));
|
|
2678
|
+
return {
|
|
2679
|
+
id: readActivityString("id"),
|
|
2680
|
+
op: readActivityString("op"),
|
|
2681
|
+
author: readActivityString("author"),
|
|
2682
|
+
from: readActivityString("from"),
|
|
2683
|
+
to: readActivityString("to"),
|
|
2684
|
+
limit: readActivityString("limit"),
|
|
2685
|
+
compact: options.full === true ? false : options.compact === false ? false : true
|
|
2686
|
+
};
|
|
2687
|
+
}
|
|
2688
|
+
var ACTIVITY_STREAM_ENABLED_VALUES = /* @__PURE__ */ new Set(["", "rows", "ndjson", "jsonl", "true", "1", "yes", "on"]);
|
|
2689
|
+
var ACTIVITY_STREAM_DISABLED_VALUES = /* @__PURE__ */ new Set(["false", "off", "none", "0"]);
|
|
2690
|
+
function resolveActivityStreamMode(raw) {
|
|
2691
|
+
if (raw === true) {
|
|
2692
|
+
return true;
|
|
2693
|
+
}
|
|
2694
|
+
if (raw === false || raw === void 0 || raw === null) {
|
|
2695
|
+
return false;
|
|
2696
|
+
}
|
|
2697
|
+
if (typeof raw === "string") {
|
|
2698
|
+
const normalized = raw.trim().toLowerCase();
|
|
2699
|
+
if (ACTIVITY_STREAM_ENABLED_VALUES.has(normalized)) {
|
|
2700
|
+
return true;
|
|
2701
|
+
}
|
|
2702
|
+
if (ACTIVITY_STREAM_DISABLED_VALUES.has(normalized)) {
|
|
2703
|
+
return false;
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
throw new PmCliError("Activity --stream accepts rows|ndjson|jsonl (or no value)", EXIT_CODE.USAGE);
|
|
2707
|
+
}
|
|
2708
|
+
function normalizeContextOptions(options) {
|
|
2709
|
+
const readContextString = (target) => readFirstStringFromCommanderOptions(options, resolveCommanderContract(CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, target));
|
|
2710
|
+
const sectionRaw = options.section;
|
|
2711
|
+
const section = Array.isArray(sectionRaw) ? sectionRaw.filter((v) => typeof v === "string" && v.trim().length > 0) : typeof sectionRaw === "string" && sectionRaw.trim().length > 0 ? [sectionRaw] : void 0;
|
|
2712
|
+
const normalized = {
|
|
2713
|
+
date: readContextString("date"),
|
|
2714
|
+
from: readContextString("from"),
|
|
2715
|
+
to: readContextString("to"),
|
|
2716
|
+
past: options.past === true ? true : void 0,
|
|
2717
|
+
type: readContextString("type"),
|
|
2718
|
+
tag: readContextString("tag"),
|
|
2719
|
+
priority: readContextString("priority"),
|
|
2720
|
+
assignee: readContextString("assignee"),
|
|
2721
|
+
assigneeFilter: readContextString("assigneeFilter"),
|
|
2722
|
+
sprint: readContextString("sprint"),
|
|
2723
|
+
release: readContextString("release"),
|
|
2724
|
+
parent: readContextString("parent"),
|
|
2725
|
+
limit: readContextString("limit"),
|
|
2726
|
+
format: readContextString("format"),
|
|
2727
|
+
depth: readContextString("depth"),
|
|
2728
|
+
fields: readContextString("fields"),
|
|
2729
|
+
section: section && section.length > 0 ? section : void 0,
|
|
2730
|
+
activityLimit: readContextString("activityLimit"),
|
|
2731
|
+
staleThreshold: readContextString("staleThreshold")
|
|
2732
|
+
};
|
|
2733
|
+
for (const [key, value] of Object.entries(options)) {
|
|
2734
|
+
if (Object.hasOwn(normalized, key)) {
|
|
2735
|
+
continue;
|
|
2736
|
+
}
|
|
2737
|
+
normalized[key] = value;
|
|
2738
|
+
}
|
|
2739
|
+
return normalized;
|
|
2740
|
+
}
|
|
2741
|
+
function normalizeNextOptions(options) {
|
|
2742
|
+
const readNextString = (target) => readFirstStringFromCommanderOptions(options, resolveCommanderContract(NEXT_COMMANDER_STRING_OPTION_CONTRACTS, target));
|
|
2743
|
+
const normalized = {
|
|
2744
|
+
type: readNextString("type"),
|
|
2745
|
+
tag: readNextString("tag"),
|
|
2746
|
+
priority: readNextString("priority"),
|
|
2747
|
+
assignee: readNextString("assignee"),
|
|
2748
|
+
assigneeFilter: readNextString("assigneeFilter"),
|
|
2749
|
+
sprint: readNextString("sprint"),
|
|
2750
|
+
release: readNextString("release"),
|
|
2751
|
+
parent: readNextString("parent"),
|
|
2752
|
+
limit: readNextString("limit"),
|
|
2753
|
+
blockedLimit: readNextString("blockedLimit"),
|
|
2754
|
+
readyOnly: options.readyOnly === true || options.ready_only === true ? true : void 0,
|
|
2755
|
+
format: readNextString("format")
|
|
2756
|
+
};
|
|
2757
|
+
for (const [key, value] of Object.entries(options)) {
|
|
2758
|
+
if (Object.hasOwn(normalized, key)) {
|
|
2759
|
+
continue;
|
|
2760
|
+
}
|
|
2761
|
+
normalized[key] = value;
|
|
2762
|
+
}
|
|
2763
|
+
return normalized;
|
|
2764
|
+
}
|
|
2765
|
+
function collectMutationItemIds(result) {
|
|
2766
|
+
if (!result || typeof result !== "object") {
|
|
2767
|
+
return [];
|
|
2768
|
+
}
|
|
2769
|
+
const record = result;
|
|
2770
|
+
const ids = /* @__PURE__ */ new Set();
|
|
2771
|
+
const pushId = (value) => {
|
|
2772
|
+
if (typeof value !== "string") {
|
|
2773
|
+
return;
|
|
2774
|
+
}
|
|
2775
|
+
const normalized = value.trim();
|
|
2776
|
+
if (normalized.length === 0) {
|
|
2777
|
+
return;
|
|
2778
|
+
}
|
|
2779
|
+
ids.add(normalized);
|
|
2780
|
+
};
|
|
2781
|
+
pushId(record.id);
|
|
2782
|
+
const item = record.item;
|
|
2783
|
+
if (item && typeof item === "object") {
|
|
2784
|
+
pushId(item.id);
|
|
2785
|
+
}
|
|
2786
|
+
const explicitIds = record.ids;
|
|
2787
|
+
if (Array.isArray(explicitIds)) {
|
|
2788
|
+
for (const candidate of explicitIds) {
|
|
2789
|
+
pushId(candidate);
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
const items = record.items;
|
|
2793
|
+
if (Array.isArray(items)) {
|
|
2794
|
+
for (const candidate of items) {
|
|
2795
|
+
if (!candidate || typeof candidate !== "object") {
|
|
2796
|
+
continue;
|
|
2797
|
+
}
|
|
2798
|
+
pushId(candidate.id);
|
|
2799
|
+
}
|
|
2800
|
+
}
|
|
2801
|
+
return [...ids].sort((left, right) => left.localeCompare(right));
|
|
2802
|
+
}
|
|
2803
|
+
async function invalidateSearchCachesForMutation(globalOptions, result) {
|
|
2804
|
+
const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);
|
|
2805
|
+
const refreshResult = await refreshSearchArtifactsForMutation(pmRoot, collectMutationItemIds(result), {
|
|
2806
|
+
background: !shouldRunSearchRefreshInForeground()
|
|
2807
|
+
});
|
|
2808
|
+
if (globalOptions.profile && refreshResult.warnings.length > 0) {
|
|
2809
|
+
printError(`profile:search_refresh_warnings=${formatHookWarnings(refreshResult.warnings)}`);
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2014
2813
|
export {
|
|
2015
2814
|
resolveProviderConfigSource,
|
|
2016
2815
|
resolveEmbeddingProviders,
|
|
@@ -2025,7 +2824,6 @@ export {
|
|
|
2025
2824
|
executeEmbeddingBatchesWithRetry,
|
|
2026
2825
|
resolveSettingsWithSemanticRuntimeDefaults,
|
|
2027
2826
|
REINDEX_LOCK_ID,
|
|
2028
|
-
shouldRunSearchRefreshInForeground,
|
|
2029
2827
|
resolveVectorStores,
|
|
2030
2828
|
executeVectorQuery,
|
|
2031
2829
|
executeVectorUpsert,
|
|
@@ -2039,8 +2837,32 @@ export {
|
|
|
2039
2837
|
readVectorizationStatusLedger,
|
|
2040
2838
|
writeVectorizationStatusLedger,
|
|
2041
2839
|
refreshSemanticEmbeddingsForMutatedItems,
|
|
2042
|
-
|
|
2840
|
+
setResolvedGlobalOptions,
|
|
2841
|
+
clearResolvedGlobalOptions,
|
|
2842
|
+
getGlobalOptions,
|
|
2843
|
+
getCommandPath,
|
|
2844
|
+
applyDefaultOutputFormat,
|
|
2845
|
+
collect,
|
|
2846
|
+
readOptionString,
|
|
2847
|
+
addHiddenOption,
|
|
2848
|
+
buildBackgroundTestCommandArgs,
|
|
2849
|
+
buildBackgroundTestAllCommandArgs,
|
|
2850
|
+
formatHookWarnings,
|
|
2851
|
+
normalizeCreateOptions,
|
|
2852
|
+
normalizeUpdateOptions,
|
|
2853
|
+
extractUpdateManyMutationOptionSource,
|
|
2854
|
+
normalizeListOptions,
|
|
2855
|
+
normalizeAggregateOptions,
|
|
2856
|
+
printListJsonStream,
|
|
2857
|
+
printActivityJsonStream,
|
|
2858
|
+
normalizeSearchOptions,
|
|
2859
|
+
normalizeSearchKeywordsInput,
|
|
2860
|
+
normalizeActivityOptions,
|
|
2861
|
+
resolveActivityStreamMode,
|
|
2862
|
+
normalizeContextOptions,
|
|
2863
|
+
normalizeNextOptions,
|
|
2864
|
+
invalidateSearchCachesForMutation
|
|
2043
2865
|
};
|
|
2044
|
-
//# sourceMappingURL=chunk-
|
|
2866
|
+
//# sourceMappingURL=chunk-XZWL7VNE.js.map
|
|
2045
2867
|
|
|
2046
|
-
//# debugId=
|
|
2868
|
+
//# debugId=143ba130-1e4a-555a-ad5a-281c82c7f363
|