@unbrained/pm-cli 2026.6.6 → 2026.6.8
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/.claude-plugin/marketplace.json +1 -1
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +79 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +6 -2
- package/dist/cli/bootstrap-args.js +30 -13
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commander-usage.js +74 -4
- package/dist/cli/commander-usage.js.map +1 -1
- package/dist/cli/commands/aggregate.d.ts +8 -0
- package/dist/cli/commands/aggregate.js +84 -7
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/calendar.js +10 -3
- package/dist/cli/commands/calendar.js.map +1 -1
- package/dist/cli/commands/close-many.js +20 -11
- package/dist/cli/commands/close-many.js.map +1 -1
- package/dist/cli/commands/close.d.ts +1 -1
- package/dist/cli/commands/close.js +32 -10
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/comments-audit.js +4 -3
- package/dist/cli/commands/comments-audit.js.map +1 -1
- package/dist/cli/commands/completion.js +105 -43
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/config.d.ts +5 -4
- package/dist/cli/commands/config.js +50 -2
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/contracts.js +4 -3
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/copy.d.ts +14 -0
- package/dist/cli/commands/copy.js +153 -0
- package/dist/cli/commands/copy.js.map +1 -0
- package/dist/cli/commands/extension/doctor.js +62 -2
- package/dist/cli/commands/extension/doctor.js.map +1 -1
- package/dist/cli/commands/extension/install-sources.d.ts +8 -0
- package/dist/cli/commands/extension/install-sources.js +82 -2
- package/dist/cli/commands/extension/install-sources.js.map +1 -1
- package/dist/cli/commands/extension/scaffold.js +6 -14
- package/dist/cli/commands/extension/scaffold.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +29 -0
- package/dist/cli/commands/extension.js +61 -2
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/gc.js +10 -2
- package/dist/cli/commands/gc.js.map +1 -1
- package/dist/cli/commands/get.d.ts +9 -0
- package/dist/cli/commands/get.js +23 -2
- package/dist/cli/commands/get.js.map +1 -1
- package/dist/cli/commands/health.js +10 -2
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history-compact.d.ts +39 -0
- package/dist/cli/commands/history-compact.js +262 -0
- package/dist/cli/commands/history-compact.js.map +1 -0
- package/dist/cli/commands/index.d.ts +3 -1
- package/dist/cli/commands/index.js +5 -3
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +1 -0
- package/dist/cli/commands/init.js +48 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/list.d.ts +13 -2
- package/dist/cli/commands/list.js +189 -9
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/normalize.js +6 -4
- package/dist/cli/commands/normalize.js.map +1 -1
- package/dist/cli/commands/reindex.js +8 -4
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/schema.d.ts +13 -2
- package/dist/cli/commands/schema.js +66 -12
- package/dist/cli/commands/schema.js.map +1 -1
- package/dist/cli/commands/search.d.ts +11 -2
- package/dist/cli/commands/search.js +321 -35
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/upgrade.js +4 -12
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/error-guidance.js +26 -2
- package/dist/cli/error-guidance.js.map +1 -1
- package/dist/cli/extension-command-help.d.ts +1 -0
- package/dist/cli/extension-command-help.js +3 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/help-content.js +10 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/main.d.ts +3 -0
- package/dist/cli/main.js +18 -37
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +22 -5
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +83 -39
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +31 -7
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/register-setup.js +7 -5
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/cli/registration-helpers.js +26 -4
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/activity-A3QKFSSF.js +16 -0
- package/dist/cli-bundle/chunks/{activity-JM6DTDND.js → activity-Q7XMIZIH.js} +11 -11
- package/dist/cli-bundle/chunks/{aggregate-VNAHUNNF.js → aggregate-GBSHSXOB.js} +87 -17
- package/dist/cli-bundle/chunks/aggregate-GBSHSXOB.js.map +7 -0
- package/dist/cli-bundle/chunks/{aggregate-GI7WSZPH.js → aggregate-HKQJZUBG.js} +88 -18
- package/dist/cli-bundle/chunks/aggregate-HKQJZUBG.js.map +1 -0
- package/dist/cli-bundle/chunks/{append-WMKRXKCE.js → append-3RFOU7P5.js} +8 -8
- package/dist/cli-bundle/chunks/{append-7H5N64R2.js → append-OM74OJVT.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-KJE2FOS4.js → chunk-2BYKYPWY.js} +26 -4
- package/dist/cli-bundle/chunks/chunk-2BYKYPWY.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XTGLRY2Y.js → chunk-2HMD3JM2.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-PRJCELV4.js → chunk-2YPVCD7T.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-3FI4SEFT.js → chunk-3E3MDBTB.js} +62 -38
- package/dist/cli-bundle/chunks/chunk-3E3MDBTB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-U5SXYXSY.js → chunk-3TXWDGPU.js} +287 -45
- package/dist/cli-bundle/chunks/chunk-3TXWDGPU.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-HZGUAH22.js → chunk-4TI3532H.js} +6 -7
- package/dist/cli-bundle/chunks/chunk-4TI3532H.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2HVRUSQA.js → chunk-4WYBLB6J.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-R6UFP2GE.js → chunk-5NVJA7IW.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-Q7SPNHLW.js → chunk-5WO2VKFA.js} +190 -16
- package/dist/cli-bundle/chunks/chunk-5WO2VKFA.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-IOR7LGF4.js → chunk-7NQIY7Z6.js} +89 -7
- package/dist/cli-bundle/chunks/chunk-7NQIY7Z6.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ECCMVXGM.js → chunk-7WXGR44E.js} +305 -216
- package/dist/cli-bundle/chunks/chunk-7WXGR44E.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XSJCLN2R.js → chunk-AEMKH5WQ.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WOPXVEZP.js → chunk-ALSRBNYB.js} +28 -9
- package/dist/cli-bundle/chunks/chunk-ALSRBNYB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-6ER6DXH5.js → chunk-AXBUHLW7.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-BQHUILZS.js → chunk-BFJPMUF5.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-I6BNFU5X.js → chunk-BKQMJXWY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-XLTD2HN3.js → chunk-CBJXWXI5.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FRAUKRU2.js → chunk-D7WK2PKB.js} +36 -15
- package/dist/cli-bundle/chunks/chunk-D7WK2PKB.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PROOHX4K.js → chunk-DV27WDA7.js} +104 -21
- package/dist/cli-bundle/chunks/chunk-DV27WDA7.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-3BWOVLTH.js → chunk-EPWT7BEA.js} +8 -8
- package/dist/cli-bundle/chunks/chunk-ETZZU5QF.js +112 -0
- package/dist/cli-bundle/chunks/chunk-ETZZU5QF.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-TPH5XEVD.js → chunk-F33AQIB4.js} +303 -207
- package/dist/cli-bundle/chunks/chunk-F33AQIB4.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-NUZ5HKR4.js → chunk-F33VC5EX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WKY2IBOQ.js → chunk-FGRJZVXD.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-77GFDHGF.js → chunk-FO2TYSQZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GXSUPCBV.js → chunk-HOA3GMB6.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-OVQCEJPG.js → chunk-HP35AVFS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KJ33AOCY.js → chunk-J4DKAGTM.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-ME2YH6FN.js → chunk-JS47EKLP.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-T3LC5LKB.js → chunk-K62SNVVE.js} +5 -6
- package/dist/cli-bundle/chunks/chunk-K62SNVVE.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GU2ZJ2VV.js → chunk-KBKJVXUS.js} +35 -14
- package/dist/cli-bundle/chunks/chunk-KBKJVXUS.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-KWU6HG75.js → chunk-KCGMABHM.js} +101 -18
- package/dist/cli-bundle/chunks/chunk-KCGMABHM.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-I2HSTRJF.js → chunk-KN4WSESY.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-RZN6VURO.js → chunk-KP4KIUQT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5FDATVEZ.js → chunk-KS2U7BZ3.js} +71 -17
- package/dist/cli-bundle/chunks/chunk-KS2U7BZ3.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-MITFDD35.js → chunk-KVXIQDJG.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-IJGCZSIQ.js → chunk-L3LYL3ID.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-AO442XLN.js → chunk-M7UBTVFT.js} +10 -6
- package/dist/cli-bundle/chunks/{chunk-AO442XLN.js.map → chunk-M7UBTVFT.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UM2GBHS4.js → chunk-MSH23UWO.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-LCM63IXU.js → chunk-N4SQZ7L3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3VAM3NNM.js → chunk-NDSMKB2I.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-6P6GGMOG.js → chunk-NGEEXR2R.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PO3GSVFV.js → chunk-NLVCMVC7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-N7ACFE26.js → chunk-NUKHZZNM.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-GGYWB3Y2.js → chunk-ODN53S6H.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-23YFZ3IG.js → chunk-OTY2YEH5.js} +14 -14
- package/dist/cli-bundle/chunks/{chunk-2RSPZI5H.js → chunk-OVSSE2JP.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-4LL6TK5B.js → chunk-PQDH3S54.js} +59 -35
- package/dist/cli-bundle/chunks/chunk-PQDH3S54.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2VVCGBNV.js → chunk-QF4OPBAG.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-QO7EBBOM.js → chunk-QFVASU44.js} +38 -7
- package/dist/cli-bundle/chunks/chunk-QFVASU44.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WSMOSYRD.js → chunk-QQPZYP73.js} +14 -14
- package/dist/cli-bundle/chunks/{chunk-OZ7NSQHL.js → chunk-QWNUDGFQ.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-AY43SBIN.js → chunk-R4XIE7NQ.js} +54 -8
- package/dist/cli-bundle/chunks/chunk-R4XIE7NQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-52MAOQ6J.js → chunk-RISLL7XH.js} +71 -17
- package/dist/cli-bundle/chunks/chunk-RISLL7XH.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-GCOQW437.js → chunk-SDLEYY6A.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-W7XABV4H.js → chunk-SM3RMWGO.js} +191 -17
- package/dist/cli-bundle/chunks/chunk-SM3RMWGO.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-PIU6RSL3.js → chunk-TBLBEOEX.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-SKJWX3QB.js → chunk-TXKENAQP.js} +88 -6
- package/dist/cli-bundle/chunks/chunk-TXKENAQP.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YL2DJGYS.js → chunk-UEXNNF3K.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-UBOPJT3S.js → chunk-UMMJAJB2.js} +9 -9
- package/dist/cli-bundle/chunks/chunk-URJEZOLB.js +115 -0
- package/dist/cli-bundle/chunks/chunk-URJEZOLB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-PDDFYW4X.js → chunk-VXBUXLVD.js} +27 -8
- package/dist/cli-bundle/chunks/chunk-VXBUXLVD.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-LB3RUL2N.js → chunk-XEKZCBCS.js} +10 -6
- package/dist/cli-bundle/chunks/chunk-XEKZCBCS.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-KAG77BY3.js → chunk-XLSQ3QLT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-E5FJNAZA.js → chunk-XNGMIVQY.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-TCD3R2PF.js → chunk-XZS4MV37.js} +39 -8
- package/dist/cli-bundle/chunks/chunk-XZS4MV37.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RWPSOIEE.js → chunk-YEFOCDIK.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-5SFCOO6B.js → chunk-YJAKN2N2.js} +277 -35
- package/dist/cli-bundle/chunks/chunk-YJAKN2N2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-2VBQ6ZXS.js → chunk-Z2HXAFFH.js} +27 -5
- package/dist/cli-bundle/chunks/chunk-Z2HXAFFH.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-3LB74A67.js → chunk-Z55JACL2.js} +53 -7
- package/dist/cli-bundle/chunks/chunk-Z55JACL2.js.map +7 -0
- package/dist/cli-bundle/chunks/{claim-4DBF6RVG.js → claim-NHBIIBOW.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-X2P4IB7J.js → claim-RNEBQCOO.js} +10 -10
- package/dist/cli-bundle/chunks/close-UNTFXVM3.js +13 -0
- package/dist/cli-bundle/chunks/{close-PTYFA45H.js → close-ZMXL2WDS.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-ERFO6LHR.js → close-many-CDPQGQUB.js} +37 -28
- package/dist/cli-bundle/chunks/close-many-CDPQGQUB.js.map +1 -0
- package/dist/cli-bundle/chunks/{close-many-7CGIDPTJ.js → close-many-IQV5C2SI.js} +36 -27
- package/dist/cli-bundle/chunks/close-many-IQV5C2SI.js.map +7 -0
- package/dist/cli-bundle/chunks/{comments-QKBYCWKD.js → comments-EFVBHWPT.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-OONGABK5.js → comments-J5Q4IJPH.js} +10 -10
- package/dist/cli-bundle/chunks/{config-6FXCQKIF.js → config-72253M2O.js} +127 -12
- package/dist/cli-bundle/chunks/config-72253M2O.js.map +1 -0
- package/dist/cli-bundle/chunks/{config-U4RZ4CQB.js → config-VFYA6BMI.js} +128 -13
- package/dist/cli-bundle/chunks/config-VFYA6BMI.js.map +7 -0
- package/dist/cli-bundle/chunks/{context-FYYJGFWS.js → context-AVLO4IFH.js} +14 -14
- package/dist/cli-bundle/chunks/{context-FYYJGFWS.js.map → context-AVLO4IFH.js.map} +2 -2
- package/dist/cli-bundle/chunks/{context-YMJ3Z2HQ.js → context-WMSI2D65.js} +15 -15
- package/dist/cli-bundle/chunks/context-WMSI2D65.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-RFSPGVVJ.js → contracts-D4BN3VSQ.js} +7 -5
- package/dist/cli-bundle/chunks/contracts-D4BN3VSQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{contracts-QDB6OMLQ.js → contracts-RGPOBLPL.js} +8 -6
- package/dist/cli-bundle/chunks/contracts-RGPOBLPL.js.map +1 -0
- package/dist/cli-bundle/chunks/copy-H6TXHK7S.js +185 -0
- package/dist/cli-bundle/chunks/copy-H6TXHK7S.js.map +7 -0
- package/dist/cli-bundle/chunks/copy-WXE3OOLZ.js +182 -0
- package/dist/cli-bundle/chunks/copy-WXE3OOLZ.js.map +1 -0
- package/dist/cli-bundle/chunks/create-EZWAMUKR.js +27 -0
- package/dist/cli-bundle/chunks/{create-I5L4EYYZ.js → create-PUAIJEZ7.js} +13 -13
- package/dist/cli-bundle/chunks/{delete-7HPGI4GZ.js → delete-PKR2JHLH.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-VXUPH5RS.js → delete-WBME6WG5.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-JSRRWC3Z.js → deps-4BQEDV4L.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-SCZIFK2Z.js → deps-KWHQRO75.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-GJK6K4VP.js → docs-364GT3ZR.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-WW4N3MBM.js → docs-SCNBUGSV.js} +9 -9
- package/dist/cli-bundle/chunks/{extension-VDY2U33M.js → extension-CRE7JM47.js} +8 -6
- package/dist/cli-bundle/chunks/{extension-J7IBMFTD.js → extension-KK2UPXJD.js} +8 -6
- package/dist/cli-bundle/chunks/{files-ISZJGILQ.js → files-3GESQAWL.js} +9 -9
- package/dist/cli-bundle/chunks/{files-WKOD326U.js → files-66EHM5ZR.js} +9 -9
- package/dist/cli-bundle/chunks/{gc-JDVJ6OQ2.js → gc-D5IWOKQH.js} +13 -5
- package/dist/cli-bundle/chunks/gc-D5IWOKQH.js.map +1 -0
- package/dist/cli-bundle/chunks/{gc-ULPVWMTN.js → gc-MOQDND5J.js} +12 -4
- package/dist/cli-bundle/chunks/gc-MOQDND5J.js.map +7 -0
- package/dist/cli-bundle/chunks/{get-RV37HT3G.js → get-7J2ZCBV5.js} +34 -12
- package/dist/cli-bundle/chunks/get-7J2ZCBV5.js.map +1 -0
- package/dist/cli-bundle/chunks/{get-WXU6WI5P.js → get-WXSLXV3K.js} +33 -11
- package/dist/cli-bundle/chunks/get-WXSLXV3K.js.map +7 -0
- package/dist/cli-bundle/chunks/{health-LOI2HHKB.js → health-B6AEM7BV.js} +21 -13
- package/dist/cli-bundle/chunks/health-B6AEM7BV.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-6L6EH4WR.js → health-YMZGOMVX.js} +20 -12
- package/dist/cli-bundle/chunks/health-YMZGOMVX.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-PKN67D5O.js → history-TJTO5GCR.js} +10 -10
- package/dist/cli-bundle/chunks/history-ZERISU2L.js +20 -0
- package/dist/cli-bundle/chunks/history-compact-CKNN6UKW.js +290 -0
- package/dist/cli-bundle/chunks/history-compact-CKNN6UKW.js.map +7 -0
- package/dist/cli-bundle/chunks/history-compact-N2Q7IR3T.js +287 -0
- package/dist/cli-bundle/chunks/history-compact-N2Q7IR3T.js.map +1 -0
- package/dist/cli-bundle/chunks/history-redact-GODBYT5A.js +19 -0
- package/dist/cli-bundle/chunks/{history-redact-V4FOJGS7.js → history-redact-JUXUOH54.js} +11 -11
- package/dist/cli-bundle/chunks/{history-repair-HIBCBIKK.js → history-repair-CCCPBNTF.js} +11 -11
- package/dist/cli-bundle/chunks/{history-repair-SDMHR7JT.js → history-repair-TDBBSRVK.js} +11 -11
- package/dist/cli-bundle/chunks/{init-P56QYWJF.js → init-6ZPKD3YN.js} +9 -8
- package/dist/cli-bundle/chunks/init-CBZHXBR3.js +17 -0
- package/dist/cli-bundle/chunks/{learnings-MIXSESLK.js → learnings-U7U2FNIO.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-GDFRG5J7.js → learnings-WYNTYQ5T.js} +10 -10
- package/dist/cli-bundle/chunks/list-7MTPPZHC.js +20 -0
- package/dist/cli-bundle/chunks/{list-FGOWQMSM.js → list-JGP7ODML.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-5UK3GEH2.js → notes-P25YVTEG.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-4XVSH2AZ.js → notes-QIF6A7XS.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-DUMBV3QB.js → plan-RACB5PI6.js} +13 -13
- package/dist/cli-bundle/chunks/{plan-SLMODHWX.js → plan-SSBJFWXA.js} +13 -13
- package/dist/cli-bundle/chunks/{register-list-query-POCFZ5JW.js → register-list-query-5IXDPUZ6.js} +31 -25
- package/dist/cli-bundle/chunks/register-list-query-5IXDPUZ6.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-WST76HSQ.js → register-list-query-GQAEIG4K.js} +30 -24
- package/dist/cli-bundle/chunks/register-list-query-GQAEIG4K.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-N5GSUZJV.js → register-mutation-FAS4YG63.js} +72 -50
- package/dist/cli-bundle/chunks/register-mutation-FAS4YG63.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-OA675SOU.js → register-mutation-YZCUILGO.js} +71 -49
- package/dist/cli-bundle/chunks/register-mutation-YZCUILGO.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-N3PMHXH5.js → register-operations-IBYWNJN5.js} +57 -34
- package/dist/cli-bundle/chunks/register-operations-IBYWNJN5.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-GNHBE5I3.js → register-operations-S2BOLUPF.js} +58 -35
- package/dist/cli-bundle/chunks/register-operations-S2BOLUPF.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-setup-ZHJI2DI3.js → register-setup-ABA2JPWO.js} +20 -19
- package/dist/cli-bundle/chunks/{register-setup-ZHJI2DI3.js.map → register-setup-ABA2JPWO.js.map} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-JIMPKJKV.js → register-setup-JRZ4UMWZ.js} +21 -20
- package/dist/cli-bundle/chunks/register-setup-JRZ4UMWZ.js.map +1 -0
- package/dist/cli-bundle/chunks/restore-3JRX27QW.js +17 -0
- package/dist/cli-bundle/chunks/{restore-PBL6T5TW.js → restore-K72ZNPEP.js} +11 -11
- package/dist/cli-bundle/chunks/{schema-2NOO6NGB.js → schema-3VKRDBLC.js} +76 -20
- package/dist/cli-bundle/chunks/schema-3VKRDBLC.js.map +7 -0
- package/dist/cli-bundle/chunks/{schema-EBI4NLUO.js → schema-UL4B2JX5.js} +77 -21
- package/dist/cli-bundle/chunks/schema-UL4B2JX5.js.map +1 -0
- package/dist/cli-bundle/chunks/{search-OA6JX27A.js → search-632WJ7GO.js} +516 -41
- package/dist/cli-bundle/chunks/search-632WJ7GO.js.map +7 -0
- package/dist/cli-bundle/chunks/{search-JPUQTVCY.js → search-EQDHSE4G.js} +510 -42
- package/dist/cli-bundle/chunks/search-EQDHSE4G.js.map +1 -0
- package/dist/cli-bundle/chunks/{stats-XYB6KTFG.js → stats-O4UTMJMC.js} +7 -7
- package/dist/cli-bundle/chunks/{stats-CV54BAWY.js → stats-WLJ3XBF5.js} +7 -7
- package/dist/cli-bundle/chunks/{telemetry-LMJ7PFUO.js → telemetry-EUVHFSQU.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-NCMEPJNR.js → telemetry-NRVWX25E.js} +4 -4
- package/dist/cli-bundle/chunks/{test-WBROAJIE.js → test-GXUBQNUC.js} +14 -13
- package/dist/cli-bundle/chunks/test-XN7RJL5Z.js +32 -0
- package/dist/cli-bundle/chunks/{test-all-N6NSRDTV.js → test-all-UTFXC7S2.js} +16 -15
- package/dist/cli-bundle/chunks/{test-all-N6NSRDTV.js.map → test-all-UTFXC7S2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-all-NTOZ7C3M.js → test-all-XM6OKI3L.js} +14 -13
- package/dist/cli-bundle/chunks/{test-all-NTOZ7C3M.js.map → test-all-XM6OKI3L.js.map} +1 -1
- package/dist/cli-bundle/chunks/{test-runs-V6A7LPWZ.js → test-runs-7FHCPEA3.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-WMVTQU3Y.js → test-runs-IK6E2HNX.js} +5 -5
- package/dist/cli-bundle/chunks/update-LFBSEW3N.js +21 -0
- package/dist/cli-bundle/chunks/update-U4B4OMHZ.js +25 -0
- package/dist/cli-bundle/chunks/{update-many-KGGEYABR.js → update-many-5KD33MKY.js} +22 -22
- package/dist/cli-bundle/chunks/{update-many-EM6OXYGO.js → update-many-N3YTM7K4.js} +22 -22
- package/dist/cli-bundle/chunks/{upgrade-BLI7XBAJ.js → upgrade-5SRFLUNW.js} +8 -14
- package/dist/cli-bundle/chunks/upgrade-5SRFLUNW.js.map +7 -0
- package/dist/cli-bundle/chunks/{upgrade-LXPOQKFV.js → upgrade-FFXGO43H.js} +9 -15
- package/dist/cli-bundle/chunks/upgrade-FFXGO43H.js.map +1 -0
- package/dist/cli-bundle/chunks/{validate-L5J6A7YO.js → validate-CRWXZILW.js} +20 -19
- package/dist/cli-bundle/chunks/{validate-L5J6A7YO.js.map → validate-CRWXZILW.js.map} +1 -1
- package/dist/cli-bundle/chunks/{validate-AGOAUOVW.js → validate-T3LPWSZG.js} +18 -17
- package/dist/cli-bundle/chunks/{validate-AGOAUOVW.js.map → validate-T3LPWSZG.js.map} +1 -1
- package/dist/cli-bundle/main.js +160 -87
- package/dist/cli-bundle/main.js.map +3 -3
- package/dist/core/config/nested-settings.d.ts +8 -8
- package/dist/core/config/nested-settings.js +71 -7
- package/dist/core/config/nested-settings.js.map +1 -1
- package/dist/core/config/positional-value.js +4 -2
- package/dist/core/config/positional-value.js.map +1 -1
- package/dist/core/diagnostics/remediation.js +7 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +36 -0
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.js +46 -5
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/fs/fs-utils.js +29 -4
- package/dist/core/fs/fs-utils.js.map +1 -1
- package/dist/core/history/drift-scan.d.ts +3 -4
- package/dist/core/history/drift-scan.js +71 -18
- package/dist/core/history/drift-scan.js.map +1 -1
- package/dist/core/item/id.js +4 -5
- package/dist/core/item/id.js.map +1 -1
- package/dist/core/item/item-format.js +7 -3
- package/dist/core/item/item-format.js.map +1 -1
- package/dist/core/item/toon-decode.d.ts +7 -0
- package/dist/core/item/toon-decode.js +11 -2
- package/dist/core/item/toon-decode.js.map +1 -1
- package/dist/core/item/type-registry.js +25 -7
- package/dist/core/item/type-registry.js.map +1 -1
- package/dist/core/packages/root.d.ts +10 -0
- package/dist/core/packages/root.js +24 -2
- package/dist/core/packages/root.js.map +1 -1
- package/dist/core/schema/runtime-schema.js +3 -6
- package/dist/core/schema/runtime-schema.js.map +1 -1
- package/dist/core/search/background-refresh.d.ts +0 -8
- package/dist/core/search/background-refresh.js +2 -9
- package/dist/core/search/background-refresh.js.map +1 -1
- package/dist/core/search/cache.js +5 -3
- package/dist/core/search/cache.js.map +1 -1
- package/dist/core/search/corpus.d.ts +6 -0
- package/dist/core/search/corpus.js +22 -9
- package/dist/core/search/corpus.js.map +1 -1
- package/dist/core/search/embedding-batches.js +10 -7
- package/dist/core/search/embedding-batches.js.map +1 -1
- package/dist/core/search/relevance.d.ts +29 -0
- package/dist/core/search/relevance.js +226 -0
- package/dist/core/search/relevance.js.map +1 -0
- package/dist/core/search/vector-stores.d.ts +3 -0
- package/dist/core/search/vector-stores.js +27 -16
- package/dist/core/search/vector-stores.js.map +1 -1
- package/dist/core/sentry/instrument.js +4 -17
- package/dist/core/sentry/instrument.js.map +1 -1
- package/dist/core/shared/constants.js +15 -2
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/shared/errors.d.ts +6 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/errors.js.map +1 -1
- package/dist/core/shared/primitives.d.ts +8 -0
- package/dist/core/shared/primitives.js +29 -2
- package/dist/core/shared/primitives.js.map +1 -1
- package/dist/core/shared/time.js +42 -6
- package/dist/core/shared/time.js.map +1 -1
- package/dist/core/store/paths.js +40 -8
- package/dist/core/store/paths.js.map +1 -1
- package/dist/core/store/settings-validator.d.ts +11 -0
- package/dist/core/store/settings-validator.js +14 -2
- package/dist/core/store/settings-validator.js.map +1 -1
- package/dist/core/store/settings.js +109 -12
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +1 -0
- package/dist/core/telemetry/runtime.js +86 -5
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/mcp/server.js +109 -19
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
- package/dist/sdk/cli-contracts/commander-types.js +15 -4
- package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
- package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +7 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +32 -3
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +3 -1
- package/dist/sdk/cli-contracts.js +44 -12
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +2 -2
- package/dist/sdk/index.js +3 -3
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/testing.d.ts +51 -1
- package/dist/sdk/testing.js +93 -2
- package/dist/sdk/testing.js.map +1 -1
- package/dist/types.d.ts +14 -0
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +3 -1
- package/docs/CLAUDE_CODE_PLUGIN.md +4 -4
- package/docs/CODEX_PLUGIN.md +1 -1
- package/docs/COMMANDS.md +14 -5
- package/docs/CONFIGURATION.md +28 -1
- package/docs/EXTENSIONS.md +17 -9
- package/docs/QUICKSTART.md +1 -1
- package/docs/RELEASING.md +17 -0
- package/docs/SDK.md +66 -0
- package/docs/TESTING.md +14 -0
- package/marketplace.json +1 -1
- package/package.json +2 -1
- package/packages/pm-governance-audit/README.md +14 -0
- package/packages/pm-governance-audit/extensions/governance-audit/index.js +39 -1
- package/packages/pm-governance-audit/extensions/governance-audit/index.ts +40 -2
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +1 -1
- package/packages/pm-governance-audit/package.json +4 -2
- package/packages/pm-lifecycle-hooks/README.md +21 -0
- package/packages/pm-search-advanced/README.md +38 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +17 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +17 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +216 -1
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +271 -2
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +7 -7
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/plugins/pm-codex/README.md +1 -1
- package/dist/cli-bundle/chunks/activity-CVXTCHYY.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-GI7WSZPH.js.map +0 -1
- package/dist/cli-bundle/chunks/aggregate-VNAHUNNF.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-2VBQ6ZXS.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3FI4SEFT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-3LB74A67.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-4LL6TK5B.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-52MAOQ6J.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5FDATVEZ.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-5SFCOO6B.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-AY43SBIN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ECCMVXGM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FRAUKRU2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GU2ZJ2VV.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-HZGUAH22.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-KJE2FOS4.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-KWU6HG75.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LB3RUL2N.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-PDDFYW4X.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-PROOHX4K.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-Q7SPNHLW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-QO7EBBOM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-T3LC5LKB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TCD3R2PF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-TPH5XEVD.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-U5SXYXSY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-W7XABV4H.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-WOPXVEZP.js.map +0 -1
- package/dist/cli-bundle/chunks/close-3HDWDA3L.js +0 -13
- package/dist/cli-bundle/chunks/close-many-7CGIDPTJ.js.map +0 -7
- package/dist/cli-bundle/chunks/close-many-ERFO6LHR.js.map +0 -1
- package/dist/cli-bundle/chunks/config-6FXCQKIF.js.map +0 -1
- package/dist/cli-bundle/chunks/config-U4RZ4CQB.js.map +0 -7
- package/dist/cli-bundle/chunks/context-YMJ3Z2HQ.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-RFSPGVVJ.js.map +0 -7
- package/dist/cli-bundle/chunks/create-JTZNCTQC.js +0 -27
- package/dist/cli-bundle/chunks/gc-JDVJ6OQ2.js.map +0 -1
- package/dist/cli-bundle/chunks/gc-ULPVWMTN.js.map +0 -7
- package/dist/cli-bundle/chunks/get-RV37HT3G.js.map +0 -1
- package/dist/cli-bundle/chunks/get-WXU6WI5P.js.map +0 -7
- package/dist/cli-bundle/chunks/health-6L6EH4WR.js.map +0 -7
- package/dist/cli-bundle/chunks/health-LOI2HHKB.js.map +0 -1
- package/dist/cli-bundle/chunks/history-2BA3T5AE.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-JBZNXHGR.js +0 -19
- package/dist/cli-bundle/chunks/init-HIVSNX3O.js +0 -16
- package/dist/cli-bundle/chunks/list-MUSQNMTD.js +0 -20
- package/dist/cli-bundle/chunks/register-list-query-POCFZ5JW.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-WST76HSQ.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-N5GSUZJV.js.map +0 -1
- package/dist/cli-bundle/chunks/register-mutation-OA675SOU.js.map +0 -7
- package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-N3PMHXH5.js.map +0 -7
- package/dist/cli-bundle/chunks/register-setup-JIMPKJKV.js.map +0 -1
- package/dist/cli-bundle/chunks/restore-D4RGNX33.js +0 -17
- package/dist/cli-bundle/chunks/schema-2NOO6NGB.js.map +0 -7
- package/dist/cli-bundle/chunks/schema-EBI4NLUO.js.map +0 -1
- package/dist/cli-bundle/chunks/search-JPUQTVCY.js.map +0 -1
- package/dist/cli-bundle/chunks/search-OA6JX27A.js.map +0 -7
- package/dist/cli-bundle/chunks/test-MXX3E5JL.js +0 -31
- package/dist/cli-bundle/chunks/update-OSV3NAQB.js +0 -25
- package/dist/cli-bundle/chunks/update-YRXSUGYQ.js +0 -21
- package/dist/cli-bundle/chunks/upgrade-BLI7XBAJ.js.map +0 -7
- package/dist/cli-bundle/chunks/upgrade-LXPOQKFV.js.map +0 -1
- /package/dist/cli-bundle/chunks/{activity-CVXTCHYY.js.map → activity-A3QKFSSF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-JM6DTDND.js.map → activity-Q7XMIZIH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-WMKRXKCE.js.map → append-3RFOU7P5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-7H5N64R2.js.map → append-OM74OJVT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XTGLRY2Y.js.map → chunk-2HMD3JM2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PRJCELV4.js.map → chunk-2YPVCD7T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2HVRUSQA.js.map → chunk-4WYBLB6J.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-R6UFP2GE.js.map → chunk-5NVJA7IW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XSJCLN2R.js.map → chunk-AEMKH5WQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6ER6DXH5.js.map → chunk-AXBUHLW7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-BQHUILZS.js.map → chunk-BFJPMUF5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I6BNFU5X.js.map → chunk-BKQMJXWY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XLTD2HN3.js.map → chunk-CBJXWXI5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3BWOVLTH.js.map → chunk-EPWT7BEA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NUZ5HKR4.js.map → chunk-F33VC5EX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WKY2IBOQ.js.map → chunk-FGRJZVXD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-77GFDHGF.js.map → chunk-FO2TYSQZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GXSUPCBV.js.map → chunk-HOA3GMB6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OVQCEJPG.js.map → chunk-HP35AVFS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KJ33AOCY.js.map → chunk-J4DKAGTM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ME2YH6FN.js.map → chunk-JS47EKLP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I2HSTRJF.js.map → chunk-KN4WSESY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RZN6VURO.js.map → chunk-KP4KIUQT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MITFDD35.js.map → chunk-KVXIQDJG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-IJGCZSIQ.js.map → chunk-L3LYL3ID.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UM2GBHS4.js.map → chunk-MSH23UWO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-LCM63IXU.js.map → chunk-N4SQZ7L3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-3VAM3NNM.js.map → chunk-NDSMKB2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6P6GGMOG.js.map → chunk-NGEEXR2R.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PO3GSVFV.js.map → chunk-NLVCMVC7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-N7ACFE26.js.map → chunk-NUKHZZNM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GGYWB3Y2.js.map → chunk-ODN53S6H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-23YFZ3IG.js.map → chunk-OTY2YEH5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2RSPZI5H.js.map → chunk-OVSSE2JP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-2VVCGBNV.js.map → chunk-QF4OPBAG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WSMOSYRD.js.map → chunk-QQPZYP73.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OZ7NSQHL.js.map → chunk-QWNUDGFQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-GCOQW437.js.map → chunk-SDLEYY6A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PIU6RSL3.js.map → chunk-TBLBEOEX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YL2DJGYS.js.map → chunk-UEXNNF3K.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-UBOPJT3S.js.map → chunk-UMMJAJB2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KAG77BY3.js.map → chunk-XLSQ3QLT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E5FJNAZA.js.map → chunk-XNGMIVQY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RWPSOIEE.js.map → chunk-YEFOCDIK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-4DBF6RVG.js.map → claim-NHBIIBOW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-X2P4IB7J.js.map → claim-RNEBQCOO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-3HDWDA3L.js.map → close-UNTFXVM3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-PTYFA45H.js.map → close-ZMXL2WDS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-QKBYCWKD.js.map → comments-EFVBHWPT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-OONGABK5.js.map → comments-J5Q4IJPH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-JTZNCTQC.js.map → create-EZWAMUKR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-I5L4EYYZ.js.map → create-PUAIJEZ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-7HPGI4GZ.js.map → delete-PKR2JHLH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-VXUPH5RS.js.map → delete-WBME6WG5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-JSRRWC3Z.js.map → deps-4BQEDV4L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-SCZIFK2Z.js.map → deps-KWHQRO75.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-GJK6K4VP.js.map → docs-364GT3ZR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-WW4N3MBM.js.map → docs-SCNBUGSV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-VDY2U33M.js.map → extension-CRE7JM47.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-J7IBMFTD.js.map → extension-KK2UPXJD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-ISZJGILQ.js.map → files-3GESQAWL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-WKOD326U.js.map → files-66EHM5ZR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-PKN67D5O.js.map → history-TJTO5GCR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-2BA3T5AE.js.map → history-ZERISU2L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-JBZNXHGR.js.map → history-redact-GODBYT5A.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-V4FOJGS7.js.map → history-redact-JUXUOH54.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-HIBCBIKK.js.map → history-repair-CCCPBNTF.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-SDMHR7JT.js.map → history-repair-TDBBSRVK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-P56QYWJF.js.map → init-6ZPKD3YN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-HIVSNX3O.js.map → init-CBZHXBR3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-MIXSESLK.js.map → learnings-U7U2FNIO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-GDFRG5J7.js.map → learnings-WYNTYQ5T.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-MUSQNMTD.js.map → list-7MTPPZHC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-FGOWQMSM.js.map → list-JGP7ODML.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-5UK3GEH2.js.map → notes-P25YVTEG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-4XVSH2AZ.js.map → notes-QIF6A7XS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-DUMBV3QB.js.map → plan-RACB5PI6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-SLMODHWX.js.map → plan-SSBJFWXA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-D4RGNX33.js.map → restore-3JRX27QW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-PBL6T5TW.js.map → restore-K72ZNPEP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-XYB6KTFG.js.map → stats-O4UTMJMC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-CV54BAWY.js.map → stats-WLJ3XBF5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-LMJ7PFUO.js.map → telemetry-EUVHFSQU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-NCMEPJNR.js.map → telemetry-NRVWX25E.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-WBROAJIE.js.map → test-GXUBQNUC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-MXX3E5JL.js.map → test-XN7RJL5Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-V6A7LPWZ.js.map → test-runs-7FHCPEA3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-WMVTQU3Y.js.map → test-runs-IK6E2HNX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-YRXSUGYQ.js.map → update-LFBSEW3N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-OSV3NAQB.js.map → update-U4B4OMHZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-KGGEYABR.js.map → update-many-5KD33MKY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-EM6OXYGO.js.map → update-many-N3YTM7K4.js.map} +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { appendFileSync, mkdirSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
1
3
|
import {
|
|
2
4
|
runCommentsAuditPackage,
|
|
3
5
|
runDedupeAuditPackage,
|
|
@@ -9,9 +11,12 @@ export const manifest = {
|
|
|
9
11
|
version: "0.1.0",
|
|
10
12
|
entry: "./index.js",
|
|
11
13
|
priority: 0,
|
|
12
|
-
capabilities: ["commands", "schema"],
|
|
14
|
+
capabilities: ["commands", "schema", "hooks"],
|
|
13
15
|
};
|
|
14
16
|
|
|
17
|
+
const HOOK_LOG_ENV = "PM_GOVERNANCE_AUDIT_HOOK_LOG";
|
|
18
|
+
const createdHookLogDirs = new Set();
|
|
19
|
+
|
|
15
20
|
const dedupeAuditFlags = [
|
|
16
21
|
{ long: "--mode", value_name: "value", value_type: "string", description: "Audit mode: title_exact|title_fuzzy|parent_scope." },
|
|
17
22
|
{ long: "--status", value_name: "value", value_type: "string", description: "Filter by status." },
|
|
@@ -105,10 +110,43 @@ function normalizeCommand() {
|
|
|
105
110
|
};
|
|
106
111
|
}
|
|
107
112
|
|
|
113
|
+
function appendHookAuditRecord(kind, context) {
|
|
114
|
+
const logPath = process.env[HOOK_LOG_ENV]?.trim();
|
|
115
|
+
if (!logPath) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
try {
|
|
119
|
+
const absoluteLogPath = path.resolve(logPath);
|
|
120
|
+
const logDir = path.dirname(absoluteLogPath);
|
|
121
|
+
if (!createdHookLogDirs.has(logDir)) {
|
|
122
|
+
mkdirSync(logDir, { recursive: true });
|
|
123
|
+
createdHookLogDirs.add(logDir);
|
|
124
|
+
}
|
|
125
|
+
const writeContext = kind === "on_write" ? context : undefined;
|
|
126
|
+
appendFileSync(
|
|
127
|
+
absoluteLogPath,
|
|
128
|
+
`${JSON.stringify({
|
|
129
|
+
kind,
|
|
130
|
+
path: context.path,
|
|
131
|
+
scope: context.scope,
|
|
132
|
+
op: writeContext?.op,
|
|
133
|
+
item_id: writeContext?.item_id,
|
|
134
|
+
item_type: writeContext?.item_type,
|
|
135
|
+
changed_fields: writeContext?.changed_fields,
|
|
136
|
+
})}\n`,
|
|
137
|
+
"utf8",
|
|
138
|
+
);
|
|
139
|
+
} catch {
|
|
140
|
+
// Best-effort sidecar logging must not interrupt core read/write flows.
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
108
144
|
export function activate(api) {
|
|
109
145
|
api.registerCommand(dedupeAuditCommand());
|
|
110
146
|
api.registerCommand(commentsAuditCommand());
|
|
111
147
|
api.registerCommand(normalizeCommand());
|
|
148
|
+
api.hooks.onRead((context) => appendHookAuditRecord("on_read", context));
|
|
149
|
+
api.hooks.onWrite((context) => appendHookAuditRecord("on_write", context));
|
|
112
150
|
}
|
|
113
151
|
|
|
114
152
|
export default {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { appendFileSync, mkdirSync } from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import type { CommandDefinition, ExtensionApi, OnReadHookContext, OnWriteHookContext } from "../../../../src/sdk/index.js";
|
|
2
4
|
import {
|
|
3
5
|
runCommentsAuditPackage,
|
|
4
6
|
runDedupeAuditPackage,
|
|
@@ -10,9 +12,12 @@ export const manifest = {
|
|
|
10
12
|
version: "0.1.0",
|
|
11
13
|
entry: "./index.js",
|
|
12
14
|
priority: 0,
|
|
13
|
-
capabilities: ["commands", "schema"],
|
|
15
|
+
capabilities: ["commands", "schema", "hooks"],
|
|
14
16
|
};
|
|
15
17
|
|
|
18
|
+
const HOOK_LOG_ENV = "PM_GOVERNANCE_AUDIT_HOOK_LOG";
|
|
19
|
+
const createdHookLogDirs = new Set<string>();
|
|
20
|
+
|
|
16
21
|
const dedupeAuditFlags = [
|
|
17
22
|
{ long: "--mode", value_name: "value", value_type: "string", description: "Audit mode: title_exact|title_fuzzy|parent_scope." },
|
|
18
23
|
{ long: "--status", value_name: "value", value_type: "string", description: "Filter by status." },
|
|
@@ -106,10 +111,43 @@ function normalizeCommand(): CommandDefinition {
|
|
|
106
111
|
};
|
|
107
112
|
}
|
|
108
113
|
|
|
114
|
+
function appendHookAuditRecord(kind: "on_read" | "on_write", context: OnReadHookContext | OnWriteHookContext): void {
|
|
115
|
+
const logPath = process.env[HOOK_LOG_ENV]?.trim();
|
|
116
|
+
if (!logPath) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
try {
|
|
120
|
+
const absoluteLogPath = path.resolve(logPath);
|
|
121
|
+
const logDir = path.dirname(absoluteLogPath);
|
|
122
|
+
if (!createdHookLogDirs.has(logDir)) {
|
|
123
|
+
mkdirSync(logDir, { recursive: true });
|
|
124
|
+
createdHookLogDirs.add(logDir);
|
|
125
|
+
}
|
|
126
|
+
const writeContext = kind === "on_write" ? (context as OnWriteHookContext) : undefined;
|
|
127
|
+
appendFileSync(
|
|
128
|
+
absoluteLogPath,
|
|
129
|
+
`${JSON.stringify({
|
|
130
|
+
kind,
|
|
131
|
+
path: context.path,
|
|
132
|
+
scope: context.scope,
|
|
133
|
+
op: writeContext?.op,
|
|
134
|
+
item_id: writeContext?.item_id,
|
|
135
|
+
item_type: writeContext?.item_type,
|
|
136
|
+
changed_fields: writeContext?.changed_fields,
|
|
137
|
+
})}\n`,
|
|
138
|
+
"utf8",
|
|
139
|
+
);
|
|
140
|
+
} catch {
|
|
141
|
+
// Best-effort sidecar logging must not interrupt core read/write flows.
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
109
145
|
export function activate(api: ExtensionApi): void {
|
|
110
146
|
api.registerCommand(dedupeAuditCommand());
|
|
111
147
|
api.registerCommand(commentsAuditCommand());
|
|
112
148
|
api.registerCommand(normalizeCommand());
|
|
149
|
+
api.hooks.onRead((context) => appendHookAuditRecord("on_read", context));
|
|
150
|
+
api.hooks.onWrite((context) => appendHookAuditRecord("on_write", context));
|
|
113
151
|
}
|
|
114
152
|
|
|
115
153
|
export default {
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"project-management",
|
|
19
19
|
"governance",
|
|
20
20
|
"audit",
|
|
21
|
-
"normalize"
|
|
21
|
+
"normalize",
|
|
22
|
+
"hooks"
|
|
22
23
|
],
|
|
23
24
|
"pm": {
|
|
24
25
|
"aliases": [
|
|
@@ -34,7 +35,8 @@
|
|
|
34
35
|
"tags": [
|
|
35
36
|
"governance",
|
|
36
37
|
"audit",
|
|
37
|
-
"normalize"
|
|
38
|
+
"normalize",
|
|
39
|
+
"hooks"
|
|
38
40
|
],
|
|
39
41
|
"links": {
|
|
40
42
|
"docs": "https://github.com/unbraind/pm-cli/tree/main/packages/pm-governance-audit#readme",
|
|
@@ -11,6 +11,27 @@ Transition-aware packages can inspect `afterCommand`'s optional `affected`
|
|
|
11
11
|
entries for item mutations. Each entry includes the item id, operation,
|
|
12
12
|
previous/current status, changed fields, and compact front matter snapshots.
|
|
13
13
|
|
|
14
|
+
Copy this pattern when a package needs command-level notifications without
|
|
15
|
+
parsing command results or reading item files:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
api.hooks.afterCommand((event) => {
|
|
19
|
+
const transitions = event.affected?.filter(
|
|
20
|
+
(item) => item.previous_status !== item.status && item.status !== undefined,
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
if (!transitions?.length) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Notify, enqueue, or cache based on item.id, item.previous_status,
|
|
28
|
+
// item.status, item.changed_fields, and item.current.
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Use `afterCommand` for command-level context such as notifications. Use
|
|
33
|
+
`onWrite` when a package needs file-level sync or audit behavior.
|
|
34
|
+
|
|
14
35
|
## Capabilities
|
|
15
36
|
|
|
16
37
|
- `hooks`
|
|
@@ -16,6 +16,8 @@ First-party package that restores optional advanced search surfaces in bare-core
|
|
|
16
16
|
- Adds `pm reindex` with:
|
|
17
17
|
- `--mode keyword|semantic|hybrid`
|
|
18
18
|
- `--progress`
|
|
19
|
+
- `--eval`
|
|
20
|
+
- `--eval-fixtures <path>`
|
|
19
21
|
|
|
20
22
|
## Install
|
|
21
23
|
|
|
@@ -30,6 +32,42 @@ pm search-advanced "vector cache" --mode hybrid --limit 5 --json
|
|
|
30
32
|
pm search-advanced --hybrid "vector cache" --limit 5 --json
|
|
31
33
|
pm search-advanced "calendar package" --mode keyword --fields id,title,score --compact --json
|
|
32
34
|
pm reindex --mode hybrid --progress --json
|
|
35
|
+
pm reindex --mode keyword --eval --eval-fixtures tests/search-eval/golden-queries.json --json
|
|
33
36
|
```
|
|
34
37
|
|
|
35
38
|
Without `--mode`, `--semantic`, or `--hybrid`, `search-advanced` stays keyword-first for fast agent reads.
|
|
39
|
+
|
|
40
|
+
## Reindex eval harness
|
|
41
|
+
|
|
42
|
+
`pm reindex --eval` runs a golden-query relevance harness after the reindex pass and appends a deterministic `eval` object to JSON output:
|
|
43
|
+
|
|
44
|
+
- per-fixture pass/fail verdicts
|
|
45
|
+
- `ndcg_at_5` score for each fixture
|
|
46
|
+
- aggregate `average_ndcg_at_5`, pass/fail counts, and overall status
|
|
47
|
+
|
|
48
|
+
The default fixture file is `tests/search-eval/golden-queries.json`. Override with `--eval-fixtures <path>`.
|
|
49
|
+
|
|
50
|
+
### Fixture schema
|
|
51
|
+
|
|
52
|
+
Fixtures can be either a top-level array or an object with a `fixtures` array:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"fixtures": [
|
|
57
|
+
{
|
|
58
|
+
"name": "search-eval-task",
|
|
59
|
+
"query": "pm-22x2 search relevance evaluation harness",
|
|
60
|
+
"mode": "keyword",
|
|
61
|
+
"expected_top_ids": ["pm-22x2", "pm-fhsg"],
|
|
62
|
+
"min_ndcg_at_5": 0.8
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Rules:
|
|
69
|
+
|
|
70
|
+
- `query` is required and must be non-empty.
|
|
71
|
+
- `mode` is optional (`keyword`, `semantic`, `hybrid`), default `keyword`.
|
|
72
|
+
- `expected_top_ids` is required and defines the ideal ranking for nDCG@5.
|
|
73
|
+
- `min_ndcg_at_5` is optional (`0..1`), default `0.7`.
|
|
@@ -200,6 +200,23 @@ const reindexFlags = [
|
|
|
200
200
|
value_type: "boolean",
|
|
201
201
|
description: "Emit non-interactive progress lines to stderr.",
|
|
202
202
|
},
|
|
203
|
+
{
|
|
204
|
+
long: "--eval",
|
|
205
|
+
value_type: "boolean",
|
|
206
|
+
description: "Run golden-query relevance eval and append nDCG@5 summary output.",
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
long: "--eval-fixtures",
|
|
210
|
+
value_name: "path",
|
|
211
|
+
value_type: "string",
|
|
212
|
+
description: "Path to reindex eval fixtures JSON (default: tests/search-eval/golden-queries.json).",
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
long: "--eval_fixtures",
|
|
216
|
+
value_name: "path",
|
|
217
|
+
value_type: "string",
|
|
218
|
+
description: "Alias for --eval-fixtures.",
|
|
219
|
+
},
|
|
203
220
|
];
|
|
204
221
|
|
|
205
222
|
function searchAdvancedCommand() {
|
|
@@ -222,6 +222,23 @@ const reindexFlags = [
|
|
|
222
222
|
value_type: "boolean",
|
|
223
223
|
description: "Emit non-interactive progress lines to stderr.",
|
|
224
224
|
},
|
|
225
|
+
{
|
|
226
|
+
long: "--eval",
|
|
227
|
+
value_type: "boolean",
|
|
228
|
+
description: "Run golden-query relevance eval and append nDCG@5 summary output.",
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
long: "--eval-fixtures",
|
|
232
|
+
value_name: "path",
|
|
233
|
+
value_type: "string",
|
|
234
|
+
description: "Path to reindex eval fixtures JSON (default: tests/search-eval/golden-queries.json).",
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
long: "--eval_fixtures",
|
|
238
|
+
value_name: "path",
|
|
239
|
+
value_type: "string",
|
|
240
|
+
description: "Alias for --eval-fixtures.",
|
|
241
|
+
},
|
|
225
242
|
] as const;
|
|
226
243
|
|
|
227
244
|
function searchAdvancedCommand(): CommandDefinition {
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
1
2
|
import path from "node:path";
|
|
2
3
|
import { pathToFileURL } from "node:url";
|
|
3
4
|
|
|
4
5
|
const PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
|
|
6
|
+
const DEFAULT_EVAL_FIXTURES_PATH = path.join("tests", "search-eval", "golden-queries.json");
|
|
7
|
+
const DEFAULT_EVAL_MIN_NDCG_AT_5 = 0.7;
|
|
8
|
+
const EVAL_RANK_CUTOFF = 5;
|
|
9
|
+
const VALID_EVAL_SEARCH_MODES = new Set(["keyword", "semantic", "hybrid"]);
|
|
10
|
+
|
|
5
11
|
const sdk = await loadSearchSdkModule();
|
|
6
12
|
const {
|
|
7
13
|
EXIT_CODE,
|
|
@@ -136,10 +142,219 @@ function normalizeReindexOptions(rawOptions) {
|
|
|
136
142
|
};
|
|
137
143
|
}
|
|
138
144
|
|
|
145
|
+
function normalizeEvalFixturePath(rawPath) {
|
|
146
|
+
const candidate = typeof rawPath === "string" ? rawPath : DEFAULT_EVAL_FIXTURES_PATH;
|
|
147
|
+
return path.resolve(process.cwd(), candidate);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function normalizeReindexRuntimeOptions(rawOptions) {
|
|
151
|
+
const reindex = normalizeReindexOptions(rawOptions);
|
|
152
|
+
const evalEnabled = readBooleanOption(rawOptions, "eval") === true;
|
|
153
|
+
const evalFixturePath = readStringOption(rawOptions, "evalFixtures", ["eval_fixtures"]);
|
|
154
|
+
if (!evalEnabled) {
|
|
155
|
+
if (typeof evalFixturePath === "string" && evalFixturePath.trim().length > 0) {
|
|
156
|
+
throw new PmCliError("`--eval-fixtures` requires `--eval`.", EXIT_CODE.USAGE);
|
|
157
|
+
}
|
|
158
|
+
return { reindex };
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
reindex,
|
|
162
|
+
eval: {
|
|
163
|
+
fixturesPath: normalizeEvalFixturePath(evalFixturePath),
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function toScoreAtRank(relevance, rankIndex) {
|
|
169
|
+
if (relevance <= 0) {
|
|
170
|
+
return 0;
|
|
171
|
+
}
|
|
172
|
+
return (2 ** relevance - 1) / Math.log2(rankIndex + 2);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function roundMetric(value) {
|
|
176
|
+
return Math.round(value * 10_000) / 10_000;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function toCompactExpectedIds(value, fixtureLabel, fixturesPath) {
|
|
180
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
181
|
+
throw new PmCliError(
|
|
182
|
+
`Reindex eval fixture ${fixtureLabel} in ${fixturesPath} must provide a non-empty expected_top_ids array.`,
|
|
183
|
+
EXIT_CODE.USAGE,
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
const expectedIds = value
|
|
187
|
+
.filter((entry) => typeof entry === "string")
|
|
188
|
+
.map((entry) => entry.trim())
|
|
189
|
+
.filter((entry) => entry.length > 0);
|
|
190
|
+
if (expectedIds.length === 0) {
|
|
191
|
+
throw new PmCliError(
|
|
192
|
+
`Reindex eval fixture ${fixtureLabel} in ${fixturesPath} must provide at least one non-empty expected_top_ids value.`,
|
|
193
|
+
EXIT_CODE.USAGE,
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
return [...new Set(expectedIds)];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function normalizeFixtureMode(rawMode, fixtureLabel, fixturesPath) {
|
|
200
|
+
if (rawMode === undefined) {
|
|
201
|
+
return "keyword";
|
|
202
|
+
}
|
|
203
|
+
const normalized = typeof rawMode === "string" ? rawMode.trim().toLowerCase() : "";
|
|
204
|
+
if (VALID_EVAL_SEARCH_MODES.has(normalized)) {
|
|
205
|
+
return normalized;
|
|
206
|
+
}
|
|
207
|
+
throw new PmCliError(
|
|
208
|
+
`Reindex eval fixture ${fixtureLabel} in ${fixturesPath} has unsupported mode "${String(rawMode)}". Expected keyword|semantic|hybrid.`,
|
|
209
|
+
EXIT_CODE.USAGE,
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function normalizeFixtureThreshold(rawValue, fixtureLabel, fixturesPath) {
|
|
214
|
+
if (rawValue === undefined) {
|
|
215
|
+
return DEFAULT_EVAL_MIN_NDCG_AT_5;
|
|
216
|
+
}
|
|
217
|
+
const parsed = typeof rawValue === "number" ? rawValue : Number.NaN;
|
|
218
|
+
if (!Number.isFinite(parsed) || parsed < 0 || parsed > 1) {
|
|
219
|
+
throw new PmCliError(
|
|
220
|
+
`Reindex eval fixture ${fixtureLabel} in ${fixturesPath} has invalid min_ndcg_at_5; expected a number between 0 and 1.`,
|
|
221
|
+
EXIT_CODE.USAGE,
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
return parsed;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function normalizeFixtureEntry(rawFixture, index, fixturesPath) {
|
|
228
|
+
if (!rawFixture || typeof rawFixture !== "object") {
|
|
229
|
+
throw new PmCliError(
|
|
230
|
+
`Reindex eval fixture at index ${index + 1} in ${fixturesPath} must be an object.`,
|
|
231
|
+
EXIT_CODE.USAGE,
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
const rawQuery = typeof rawFixture.query === "string" ? rawFixture.query.trim() : "";
|
|
235
|
+
if (rawQuery.length === 0) {
|
|
236
|
+
throw new PmCliError(
|
|
237
|
+
`Reindex eval fixture at index ${index + 1} in ${fixturesPath} must provide a non-empty query.`,
|
|
238
|
+
EXIT_CODE.USAGE,
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
const fallbackName = `fixture-${index + 1}`;
|
|
242
|
+
const fixtureName =
|
|
243
|
+
typeof rawFixture.name === "string" && rawFixture.name.trim().length > 0 ? rawFixture.name.trim() : fallbackName;
|
|
244
|
+
return {
|
|
245
|
+
name: fixtureName,
|
|
246
|
+
query: rawQuery,
|
|
247
|
+
mode: normalizeFixtureMode(rawFixture.mode, fixtureName, fixturesPath),
|
|
248
|
+
expected_top_ids: toCompactExpectedIds(rawFixture.expected_top_ids, fixtureName, fixturesPath),
|
|
249
|
+
min_ndcg_at_5: normalizeFixtureThreshold(rawFixture.min_ndcg_at_5, fixtureName, fixturesPath),
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
function normalizeFixtureCollection(parsed, fixturesPath) {
|
|
254
|
+
const parsedObject = parsed && typeof parsed === "object" ? parsed : null;
|
|
255
|
+
const candidateFixtures = Array.isArray(parsed)
|
|
256
|
+
? parsed
|
|
257
|
+
: parsedObject && Array.isArray(parsedObject.fixtures)
|
|
258
|
+
? parsedObject.fixtures
|
|
259
|
+
: null;
|
|
260
|
+
if (!candidateFixtures) {
|
|
261
|
+
throw new PmCliError(
|
|
262
|
+
`Reindex eval fixtures at ${fixturesPath} must be an array or an object with a fixtures array.`,
|
|
263
|
+
EXIT_CODE.USAGE,
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
if (candidateFixtures.length === 0) {
|
|
267
|
+
throw new PmCliError(`Reindex eval fixtures at ${fixturesPath} must contain at least one fixture.`, EXIT_CODE.USAGE);
|
|
268
|
+
}
|
|
269
|
+
return candidateFixtures.map((entry, index) => normalizeFixtureEntry(entry, index, fixturesPath));
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
async function loadEvalFixtures(fixturesPath) {
|
|
273
|
+
let rawText = "";
|
|
274
|
+
try {
|
|
275
|
+
rawText = await readFile(fixturesPath, "utf8");
|
|
276
|
+
} catch {
|
|
277
|
+
throw new PmCliError(`Unable to read reindex eval fixtures at ${fixturesPath}.`, EXIT_CODE.USAGE);
|
|
278
|
+
}
|
|
279
|
+
let parsed;
|
|
280
|
+
try {
|
|
281
|
+
parsed = JSON.parse(rawText);
|
|
282
|
+
} catch {
|
|
283
|
+
throw new PmCliError(`Reindex eval fixtures at ${fixturesPath} must be valid JSON.`, EXIT_CODE.USAGE);
|
|
284
|
+
}
|
|
285
|
+
return normalizeFixtureCollection(parsed, fixturesPath);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function computeNdcgAt5(actualIds, expectedIds) {
|
|
289
|
+
const expectedTop = expectedIds.slice(0, EVAL_RANK_CUTOFF);
|
|
290
|
+
const relevanceById = new Map();
|
|
291
|
+
for (let index = 0; index < expectedTop.length; index += 1) {
|
|
292
|
+
relevanceById.set(expectedTop[index], expectedTop.length - index);
|
|
293
|
+
}
|
|
294
|
+
const dcg = actualIds.slice(0, EVAL_RANK_CUTOFF).reduce((sum, id, index) => {
|
|
295
|
+
const relevance = relevanceById.get(id) ?? 0;
|
|
296
|
+
return sum + toScoreAtRank(relevance, index);
|
|
297
|
+
}, 0);
|
|
298
|
+
const idealDcg = expectedTop.reduce((sum, _id, index) => sum + toScoreAtRank(expectedTop.length - index, index), 0);
|
|
299
|
+
return dcg / idealDcg;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
async function runFixtureEvaluation(fixture, global) {
|
|
303
|
+
const searchResult = await runSearch(
|
|
304
|
+
fixture.query,
|
|
305
|
+
{
|
|
306
|
+
mode: fixture.mode,
|
|
307
|
+
limit: String(EVAL_RANK_CUTOFF),
|
|
308
|
+
fields: "id,score",
|
|
309
|
+
},
|
|
310
|
+
global,
|
|
311
|
+
);
|
|
312
|
+
const actualTopIds = searchResult.items.map((item) => item.id).slice(0, EVAL_RANK_CUTOFF);
|
|
313
|
+
const ndcgAt5 = roundMetric(computeNdcgAt5(actualTopIds, fixture.expected_top_ids));
|
|
314
|
+
const minNdcgAt5 = roundMetric(fixture.min_ndcg_at_5);
|
|
315
|
+
return {
|
|
316
|
+
fixture: fixture.name,
|
|
317
|
+
query: fixture.query,
|
|
318
|
+
requested_mode: fixture.mode,
|
|
319
|
+
resolved_mode: searchResult.mode,
|
|
320
|
+
expected_top_ids: fixture.expected_top_ids,
|
|
321
|
+
actual_top_ids: actualTopIds,
|
|
322
|
+
ndcg_at_5: ndcgAt5,
|
|
323
|
+
min_ndcg_at_5: minNdcgAt5,
|
|
324
|
+
passed: ndcgAt5 >= minNdcgAt5,
|
|
325
|
+
warnings: searchResult.warnings ?? [],
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
async function runReindexEvaluation(fixturesPath, global) {
|
|
330
|
+
const fixtures = await loadEvalFixtures(fixturesPath);
|
|
331
|
+
const results = await Promise.all(fixtures.map((fixture) => runFixtureEvaluation(fixture, global)));
|
|
332
|
+
const passCount = results.filter((result) => result.passed).length;
|
|
333
|
+
const averageNdcg = roundMetric(results.reduce((sum, result) => sum + result.ndcg_at_5, 0) / results.length);
|
|
334
|
+
return {
|
|
335
|
+
enabled: true,
|
|
336
|
+
fixtures_path: fixturesPath,
|
|
337
|
+
k: EVAL_RANK_CUTOFF,
|
|
338
|
+
fixture_count: results.length,
|
|
339
|
+
pass_count: passCount,
|
|
340
|
+
fail_count: results.length - passCount,
|
|
341
|
+
average_ndcg_at_5: averageNdcg,
|
|
342
|
+
passed: passCount === results.length,
|
|
343
|
+
results,
|
|
344
|
+
evaluated_at: new Date().toISOString(),
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
|
|
139
348
|
export async function runAdvancedSearchPackage(args, rawOptions, global) {
|
|
140
349
|
return runSearch(resolveSearchQuery(args), normalizeAdvancedSearchOptions(rawOptions, args), global);
|
|
141
350
|
}
|
|
142
351
|
|
|
143
352
|
export async function runAdvancedReindexPackage(rawOptions, global) {
|
|
144
|
-
|
|
353
|
+
const options = normalizeReindexRuntimeOptions(rawOptions);
|
|
354
|
+
const reindexResult = await runReindex(options.reindex, global);
|
|
355
|
+
if (!options.eval) {
|
|
356
|
+
return reindexResult;
|
|
357
|
+
}
|
|
358
|
+
const evalSummary = await runReindexEvaluation(options.eval.fixturesPath, global);
|
|
359
|
+
return { ...reindexResult, eval: evalSummary };
|
|
145
360
|
}
|