@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
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Shape conventions:
|
|
11
11
|
* - `path` is the dotted JSON path in {@link PmSettings} (e.g. `search.provider`).
|
|
12
|
-
* - `kind` is the value shape: "string" | "integer" | "number" | "ratio"
|
|
12
|
+
* - `kind` is the value shape: "string" | "boolean" | "integer" | "number" | "ratio"
|
|
13
13
|
* - "ratio" must be a finite number in [0, 1].
|
|
14
14
|
* - "integer" must be a finite non-negative integer. Set `min: 1` for keys
|
|
15
15
|
* where the runtime silently falls back when 0 is supplied (e.g. batch
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* with no other code changes — the dispatcher walks the dotted path on the
|
|
23
23
|
* already-validated PmSettings shape.
|
|
24
24
|
*/
|
|
25
|
-
export type NestedSettingKind = "string" | "integer" | "number" | "ratio";
|
|
25
|
+
export type NestedSettingKind = "string" | "boolean" | "integer" | "number" | "ratio";
|
|
26
26
|
export interface NestedSettingDescriptor {
|
|
27
27
|
/** CLI key (snake_case). Kebab-case form is accepted by normalizing `-` → `_`. */
|
|
28
28
|
key: string;
|
|
@@ -34,6 +34,8 @@ export interface NestedSettingDescriptor {
|
|
|
34
34
|
summary: string;
|
|
35
35
|
/** Optional accepted values for string settings. */
|
|
36
36
|
choices?: readonly string[];
|
|
37
|
+
/** Require a non-empty trimmed string value for string settings. */
|
|
38
|
+
non_empty?: boolean;
|
|
37
39
|
/**
|
|
38
40
|
* Optional minimum value for `integer` / `number` kinds. When set,
|
|
39
41
|
* `parseNestedSettingValue` rejects values strictly below `min`. Useful for
|
|
@@ -47,8 +49,6 @@ export interface NestedSettingDescriptor {
|
|
|
47
49
|
* `pm config list` and in error hints.
|
|
48
50
|
*/
|
|
49
51
|
export declare const NESTED_SETTING_DESCRIPTORS: readonly NestedSettingDescriptor[];
|
|
50
|
-
/** Canonical CLI keys (in declaration order). */
|
|
51
|
-
export declare const NESTED_SETTING_KEYS: readonly string[];
|
|
52
52
|
/**
|
|
53
53
|
* Map a raw user-supplied key (kebab or snake case, any casing) onto a known
|
|
54
54
|
* nested-leaf descriptor. Returns `undefined` when the key is not a nested
|
|
@@ -58,7 +58,7 @@ export declare function resolveNestedSettingDescriptor(raw: string | undefined):
|
|
|
58
58
|
/** Recoverable parsed value with the descriptor it satisfied. */
|
|
59
59
|
export interface NestedSettingParsedValue {
|
|
60
60
|
descriptor: NestedSettingDescriptor;
|
|
61
|
-
value: string | number;
|
|
61
|
+
value: string | number | boolean;
|
|
62
62
|
}
|
|
63
63
|
/** Throwable validation error returned as a structured result. */
|
|
64
64
|
export interface NestedSettingParseError {
|
|
@@ -75,14 +75,14 @@ export type NestedSettingParseResult = {
|
|
|
75
75
|
* Validate and coerce a raw string value for a nested-leaf setting. The
|
|
76
76
|
* returned value is the typed leaf that should be written into PmSettings.
|
|
77
77
|
*
|
|
78
|
-
* Empty strings are allowed for "string" leaves
|
|
78
|
+
* Empty strings are allowed for "string" leaves unless `non_empty` is set.
|
|
79
79
|
*/
|
|
80
80
|
export declare function parseNestedSettingValue(descriptor: NestedSettingDescriptor, rawValue: string): NestedSettingParseResult;
|
|
81
81
|
/** Walk a dotted path on an arbitrary record (best-effort, returns null on miss). */
|
|
82
|
-
export declare function readNestedSettingValue(settings: unknown, descriptor: NestedSettingDescriptor): string | number | null;
|
|
82
|
+
export declare function readNestedSettingValue(settings: unknown, descriptor: NestedSettingDescriptor): string | number | boolean | null;
|
|
83
83
|
/**
|
|
84
84
|
* Set a leaf value on a settings object by walking the descriptor's dotted
|
|
85
85
|
* path. Missing intermediate objects are created. Returns `true` when the
|
|
86
86
|
* value actually changed.
|
|
87
87
|
*/
|
|
88
|
-
export declare function writeNestedSettingValue(settings: Record<string, unknown>, descriptor: NestedSettingDescriptor, value: string | number): boolean;
|
|
88
|
+
export declare function writeNestedSettingValue(settings: Record<string, unknown>, descriptor: NestedSettingDescriptor, value: string | number | boolean): boolean;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Shape conventions:
|
|
11
11
|
* - `path` is the dotted JSON path in {@link PmSettings} (e.g. `search.provider`).
|
|
12
|
-
* - `kind` is the value shape: "string" | "integer" | "number" | "ratio"
|
|
12
|
+
* - `kind` is the value shape: "string" | "boolean" | "integer" | "number" | "ratio"
|
|
13
13
|
* - "ratio" must be a finite number in [0, 1].
|
|
14
14
|
* - "integer" must be a finite non-negative integer. Set `min: 1` for keys
|
|
15
15
|
* where the runtime silently falls back when 0 is supplied (e.g. batch
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* `pm config list` and in error hints.
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
!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]="
|
|
30
|
+
!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]="1bb81b8a-b034-5aec-aa16-d395bac81342")}catch(e){}}();
|
|
31
31
|
export const NESTED_SETTING_DESCRIPTORS = [
|
|
32
32
|
{
|
|
33
33
|
key: "search_provider",
|
|
@@ -42,12 +42,50 @@ export const NESTED_SETTING_DESCRIPTORS = [
|
|
|
42
42
|
choices: ["cache_only", "semantic_configured", "semantic_auto"],
|
|
43
43
|
summary: "Mutation-time search refresh policy: cache_only, semantic_configured, or semantic_auto.",
|
|
44
44
|
},
|
|
45
|
+
{
|
|
46
|
+
key: "search_query_expansion_enabled",
|
|
47
|
+
path: "search.query_expansion.enabled",
|
|
48
|
+
kind: "boolean",
|
|
49
|
+
summary: "Enable or disable query expansion for semantic/hybrid search.",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: "search_query_expansion_provider",
|
|
53
|
+
path: "search.query_expansion.provider",
|
|
54
|
+
kind: "string",
|
|
55
|
+
summary: "Query expansion provider name (built-in openai/ollama or extension provider).",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: "search_rerank_enabled",
|
|
59
|
+
path: "search.rerank.enabled",
|
|
60
|
+
kind: "boolean",
|
|
61
|
+
summary: "Enable or disable post-retrieval reranking for hybrid search.",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
key: "search_rerank_model",
|
|
65
|
+
path: "search.rerank.model",
|
|
66
|
+
kind: "string",
|
|
67
|
+
summary: "Rerank model name override used by built-in providers.",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
key: "search_rerank_top_k",
|
|
71
|
+
path: "search.rerank.top_k",
|
|
72
|
+
kind: "integer",
|
|
73
|
+
min: 1,
|
|
74
|
+
summary: "Number of top hybrid candidates to rerank when rerank is enabled.",
|
|
75
|
+
},
|
|
45
76
|
{
|
|
46
77
|
key: "search_embedding_model",
|
|
47
78
|
path: "search.embedding_model",
|
|
48
79
|
kind: "string",
|
|
49
80
|
summary: "Default embedding model name (overrides provider-specific model when set).",
|
|
50
81
|
},
|
|
82
|
+
{
|
|
83
|
+
key: "search_embedding_corpus_max_characters",
|
|
84
|
+
path: "search.embedding_corpus_max_characters",
|
|
85
|
+
kind: "integer",
|
|
86
|
+
min: 1,
|
|
87
|
+
summary: "Maximum semantic corpus characters per item before truncation.",
|
|
88
|
+
},
|
|
51
89
|
{
|
|
52
90
|
key: "search_embedding_batch_size",
|
|
53
91
|
path: "search.embedding_batch_size",
|
|
@@ -117,6 +155,13 @@ export const NESTED_SETTING_DESCRIPTORS = [
|
|
|
117
155
|
kind: "string",
|
|
118
156
|
summary: "Vector store adapter name (lancedb, qdrant, or an extension adapter).",
|
|
119
157
|
},
|
|
158
|
+
{
|
|
159
|
+
key: "vector_store_collection_name",
|
|
160
|
+
path: "vector_store.collection_name",
|
|
161
|
+
kind: "string",
|
|
162
|
+
non_empty: true,
|
|
163
|
+
summary: "Vector collection/table name shared by Qdrant and LanceDB adapters.",
|
|
164
|
+
},
|
|
120
165
|
{
|
|
121
166
|
key: "qdrant_url",
|
|
122
167
|
path: "vector_store.qdrant.url",
|
|
@@ -137,8 +182,6 @@ export const NESTED_SETTING_DESCRIPTORS = [
|
|
|
137
182
|
},
|
|
138
183
|
];
|
|
139
184
|
const DESCRIPTOR_BY_KEY = new Map(NESTED_SETTING_DESCRIPTORS.map((descriptor) => [descriptor.key, descriptor]));
|
|
140
|
-
/** Canonical CLI keys (in declaration order). */
|
|
141
|
-
export const NESTED_SETTING_KEYS = NESTED_SETTING_DESCRIPTORS.map((descriptor) => descriptor.key);
|
|
142
185
|
/**
|
|
143
186
|
* Map a raw user-supplied key (kebab or snake case, any casing) onto a known
|
|
144
187
|
* nested-leaf descriptor. Returns `undefined` when the key is not a nested
|
|
@@ -158,14 +201,35 @@ export function resolveNestedSettingDescriptor(raw) {
|
|
|
158
201
|
* Validate and coerce a raw string value for a nested-leaf setting. The
|
|
159
202
|
* returned value is the typed leaf that should be written into PmSettings.
|
|
160
203
|
*
|
|
161
|
-
* Empty strings are allowed for "string" leaves
|
|
204
|
+
* Empty strings are allowed for "string" leaves unless `non_empty` is set.
|
|
162
205
|
*/
|
|
163
206
|
export function parseNestedSettingValue(descriptor, rawValue) {
|
|
164
207
|
if (typeof rawValue !== "string") {
|
|
165
208
|
return { ok: false, error: { message: `Config set ${descriptor.key} requires a string value` } };
|
|
166
209
|
}
|
|
167
210
|
const trimmed = rawValue.trim();
|
|
211
|
+
if (descriptor.kind === "boolean") {
|
|
212
|
+
const normalized = trimmed.toLowerCase();
|
|
213
|
+
if (normalized === "true" || normalized === "1" || normalized === "yes" || normalized === "on") {
|
|
214
|
+
return { ok: true, parsed: { descriptor, value: true } };
|
|
215
|
+
}
|
|
216
|
+
if (normalized === "false" || normalized === "0" || normalized === "no" || normalized === "off") {
|
|
217
|
+
return { ok: true, parsed: { descriptor, value: false } };
|
|
218
|
+
}
|
|
219
|
+
return {
|
|
220
|
+
ok: false,
|
|
221
|
+
error: {
|
|
222
|
+
message: `Config set ${descriptor.key} requires a boolean value (true|false), got "${rawValue}"`,
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
}
|
|
168
226
|
if (descriptor.kind === "string") {
|
|
227
|
+
if (descriptor.non_empty === true && trimmed.length === 0) {
|
|
228
|
+
return {
|
|
229
|
+
ok: false,
|
|
230
|
+
error: { message: `Config set ${descriptor.key} requires a non-empty value` },
|
|
231
|
+
};
|
|
232
|
+
}
|
|
169
233
|
if (descriptor.choices && !descriptor.choices.includes(trimmed)) {
|
|
170
234
|
return {
|
|
171
235
|
ok: false,
|
|
@@ -236,7 +300,7 @@ export function readNestedSettingValue(settings, descriptor) {
|
|
|
236
300
|
}
|
|
237
301
|
cursor = cursor[segment];
|
|
238
302
|
}
|
|
239
|
-
if (typeof cursor === "string" || typeof cursor === "number") {
|
|
303
|
+
if (typeof cursor === "string" || typeof cursor === "number" || typeof cursor === "boolean") {
|
|
240
304
|
return cursor;
|
|
241
305
|
}
|
|
242
306
|
return null;
|
|
@@ -270,4 +334,4 @@ export function writeNestedSettingValue(settings, descriptor, value) {
|
|
|
270
334
|
return true;
|
|
271
335
|
}
|
|
272
336
|
//# sourceMappingURL=nested-settings.js.map
|
|
273
|
-
//# debugId=
|
|
337
|
+
//# debugId=1bb81b8a-b034-5aec-aa16-d395bac81342
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nested-settings.js","sources":["core/config/nested-settings.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Nested leaf settings exposed via `pm config <scope> set/get <key> <value>`.\n *\n * These are simple string/number leaves of {@link PmSettings} (provider URLs,\n * vector-store adapter, search tuning) that previously required hand-editing\n * `.agents/pm/settings.json`. They live here so the same dotted path is\n * documented in one place and surfaced both to the config dispatcher and to\n * `pm config list` (so `pm config list --json` is discoverable).\n *\n * Shape conventions:\n * - `path` is the dotted JSON path in {@link PmSettings} (e.g. `search.provider`).\n * - `kind` is the value shape: \"string\" | \"integer\" | \"number\" | \"ratio\"\n * - \"ratio\" must be a finite number in [0, 1].\n * - \"integer\" must be a finite non-negative integer. Set `min: 1` for keys\n * where the runtime silently falls back when 0 is supplied (e.g. batch\n * size, timeout, max-results limits).\n * - \"number\" must be a finite number — negatives ARE allowed (e.g. score\n * thresholds may legitimately be negative when a provider normalizes\n * scores into a signed range).\n *\n * Adding a key here makes it acceptable to `pm config <scope> set <key> <value>`\n * with no other code changes — the dispatcher walks the dotted path on the\n * already-validated PmSettings shape.\n */\n\nexport type NestedSettingKind = \"string\" | \"integer\" | \"number\" | \"ratio\";\n\nexport interface NestedSettingDescriptor {\n /** CLI key (snake_case). Kebab-case form is accepted by normalizing `-` → `_`. */\n key: string;\n /** Dotted JSON path in PmSettings. */\n path: string;\n /** Value shape. */\n kind: NestedSettingKind;\n /** Short human-facing summary for `pm config list`. */\n summary: string;\n /** Optional accepted values for string settings. */\n choices?: readonly string[];\n /**\n * Optional minimum value for `integer` / `number` kinds. When set,\n * `parseNestedSettingValue` rejects values strictly below `min`. Useful for\n * settings where 0 would be silently ignored by the runtime (batch sizes,\n * timeouts, max-results limits).\n */\n min?: number;\n}\n\n/**\n * Search/provider/vector-store leaves. Order is the display order in\n * `pm config list` and in error hints.\n */\nexport const NESTED_SETTING_DESCRIPTORS: readonly NestedSettingDescriptor[] = [\n {\n key: \"search_provider\",\n path: \"search.provider\",\n kind: \"string\",\n summary: \"Search embedding provider name (e.g. openai, ollama, or an extension provider).\",\n },\n {\n key: \"search_mutation_refresh_policy\",\n path: \"search.mutation_refresh_policy\",\n kind: \"string\",\n choices: [\"cache_only\", \"semantic_configured\", \"semantic_auto\"],\n summary: \"Mutation-time search refresh policy: cache_only, semantic_configured, or semantic_auto.\",\n },\n {\n key: \"search_embedding_model\",\n path: \"search.embedding_model\",\n kind: \"string\",\n summary: \"Default embedding model name (overrides provider-specific model when set).\",\n },\n {\n key: \"search_embedding_batch_size\",\n path: \"search.embedding_batch_size\",\n kind: \"integer\",\n min: 1,\n summary: \"Number of items embedded per request batch.\",\n },\n {\n key: \"search_embedding_timeout_ms\",\n path: \"search.embedding_timeout_ms\",\n kind: \"integer\",\n min: 1,\n summary: \"Per-request embedding timeout in milliseconds.\",\n },\n {\n key: \"search_score_threshold\",\n path: \"search.score_threshold\",\n kind: \"number\",\n summary: \"Minimum score for a hit to be returned (0 keeps all matches).\",\n },\n {\n key: \"search_hybrid_semantic_weight\",\n path: \"search.hybrid_semantic_weight\",\n kind: \"ratio\",\n summary: \"Hybrid mode semantic weight in [0, 1] (1-weight goes to keyword).\",\n },\n {\n key: \"search_max_results\",\n path: \"search.max_results\",\n kind: \"integer\",\n min: 1,\n summary: \"Default upper bound on search hits when --limit is not supplied.\",\n },\n {\n key: \"openai_base_url\",\n path: \"providers.openai.base_url\",\n kind: \"string\",\n summary: \"OpenAI-compatible API base URL (LM Studio/vLLM also use this).\",\n },\n {\n key: \"openai_api_key\",\n path: \"providers.openai.api_key\",\n kind: \"string\",\n summary: \"OpenAI-compatible API key.\",\n },\n {\n key: \"openai_model\",\n path: \"providers.openai.model\",\n kind: \"string\",\n summary: \"OpenAI-compatible embedding model name.\",\n },\n {\n key: \"ollama_base_url\",\n path: \"providers.ollama.base_url\",\n kind: \"string\",\n summary: \"Ollama API base URL (typically http://localhost:11434).\",\n },\n {\n key: \"ollama_model\",\n path: \"providers.ollama.model\",\n kind: \"string\",\n summary: \"Ollama embedding model name (e.g. nomic-embed-text).\",\n },\n {\n key: \"vector_store_adapter\",\n path: \"vector_store.adapter\",\n kind: \"string\",\n summary: \"Vector store adapter name (lancedb, qdrant, or an extension adapter).\",\n },\n {\n key: \"qdrant_url\",\n path: \"vector_store.qdrant.url\",\n kind: \"string\",\n summary: \"Qdrant HTTP API URL.\",\n },\n {\n key: \"qdrant_api_key\",\n path: \"vector_store.qdrant.api_key\",\n kind: \"string\",\n summary: \"Qdrant API key (empty if running unauthenticated).\",\n },\n {\n key: \"lancedb_path\",\n path: \"vector_store.lancedb.path\",\n kind: \"string\",\n summary: \"LanceDB storage path (relative to pm root or absolute).\",\n },\n];\n\nconst DESCRIPTOR_BY_KEY: ReadonlyMap<string, NestedSettingDescriptor> = new Map(\n NESTED_SETTING_DESCRIPTORS.map((descriptor) => [descriptor.key, descriptor]),\n);\n\n/** Canonical CLI keys (in declaration order). */\nexport const NESTED_SETTING_KEYS: readonly string[] = NESTED_SETTING_DESCRIPTORS.map(\n (descriptor) => descriptor.key,\n);\n\n/**\n * Map a raw user-supplied key (kebab or snake case, any casing) onto a known\n * nested-leaf descriptor. Returns `undefined` when the key is not a nested\n * leaf (callers can then fall back to the regular ConfigKey path).\n */\nexport function resolveNestedSettingDescriptor(raw: string | undefined): NestedSettingDescriptor | undefined {\n if (typeof raw !== \"string\") {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized.length === 0) {\n return undefined;\n }\n return DESCRIPTOR_BY_KEY.get(normalized);\n}\n\n/** Recoverable parsed value with the descriptor it satisfied. */\nexport interface NestedSettingParsedValue {\n descriptor: NestedSettingDescriptor;\n value: string | number;\n}\n\n/** Throwable validation error returned as a structured result. */\nexport interface NestedSettingParseError {\n message: string;\n}\n\nexport type NestedSettingParseResult =\n | { ok: true; parsed: NestedSettingParsedValue }\n | { ok: false; error: NestedSettingParseError };\n\n/**\n * Validate and coerce a raw string value for a nested-leaf setting. The\n * returned value is the typed leaf that should be written into PmSettings.\n *\n * Empty strings are allowed for \"string\" leaves (used to clear a value).\n */\nexport function parseNestedSettingValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n): NestedSettingParseResult {\n if (typeof rawValue !== \"string\") {\n return { ok: false, error: { message: `Config set ${descriptor.key} requires a string value` } };\n }\n const trimmed = rawValue.trim();\n if (descriptor.kind === \"string\") {\n if (descriptor.choices && !descriptor.choices.includes(trimmed)) {\n return {\n ok: false,\n error: {\n message: `Config set ${descriptor.key} must be one of ${descriptor.choices.join(\"|\")}, got \"${rawValue}\"`,\n },\n };\n }\n return { ok: true, parsed: { descriptor, value: trimmed } };\n }\n\n // Number(\"\") === 0, which would silently accept empty / whitespace-only input\n // as a valid zero. Reject explicitly so misconfigurations don't slip through.\n if (trimmed.length === 0) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a non-empty value` },\n };\n }\n\n const parsed = Number(trimmed);\n if (!Number.isFinite(parsed)) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a finite number, got \"${rawValue}\"` },\n };\n }\n if (descriptor.kind === \"integer\") {\n if (!Number.isInteger(parsed) || parsed < 0) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a non-negative integer, got \"${rawValue}\"` },\n };\n }\n if (descriptor.min !== undefined && parsed < descriptor.min) {\n return {\n ok: false,\n error: {\n message: `Config set ${descriptor.key} requires an integer >= ${descriptor.min}, got \"${rawValue}\" (the runtime silently ignores 0 here and falls back to the default)`,\n },\n };\n }\n return { ok: true, parsed: { descriptor, value: parsed } };\n }\n if (descriptor.kind === \"ratio\") {\n if (parsed < 0 || parsed > 1) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a number in [0, 1], got \"${rawValue}\"` },\n };\n }\n return { ok: true, parsed: { descriptor, value: parsed } };\n }\n // kind === \"number\" — negatives are allowed; only apply an explicit `min`.\n if (descriptor.min !== undefined && parsed < descriptor.min) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a number >= ${descriptor.min}, got \"${rawValue}\"` },\n };\n }\n return { ok: true, parsed: { descriptor, value: parsed } };\n}\n\n/** Walk a dotted path on an arbitrary record (best-effort, returns null on miss). */\nexport function readNestedSettingValue(settings: unknown, descriptor: NestedSettingDescriptor): string | number | null {\n const segments = descriptor.path.split(\".\");\n let cursor: unknown = settings;\n for (const segment of segments) {\n if (typeof cursor !== \"object\" || cursor === null) {\n return null;\n }\n cursor = (cursor as Record<string, unknown>)[segment];\n }\n if (typeof cursor === \"string\" || typeof cursor === \"number\") {\n return cursor;\n }\n return null;\n}\n\n/**\n * Set a leaf value on a settings object by walking the descriptor's dotted\n * path. Missing intermediate objects are created. Returns `true` when the\n * value actually changed.\n */\nexport function writeNestedSettingValue(\n settings: Record<string, unknown>,\n descriptor: NestedSettingDescriptor,\n value: string | number,\n): boolean {\n const segments = descriptor.path.split(\".\");\n let cursor: Record<string, unknown> = settings;\n for (let index = 0; index < segments.length - 1; index += 1) {\n const segment = segments[index];\n const existing = cursor[segment];\n if (typeof existing !== \"object\" || existing === null || Array.isArray(existing)) {\n const next: Record<string, unknown> = {};\n cursor[segment] = next;\n cursor = next;\n } else {\n cursor = existing as Record<string, unknown>;\n }\n }\n const leafKey = segments[segments.length - 1];\n const previous = cursor[leafKey];\n if (previous === value) {\n return false;\n }\n cursor[leafKey] = value;\n return true;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAwBH;;;GAGG;;;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAuC;IAC5E;QACE,GAAG,EA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AAM,QAAQ,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5C,IAAI,MAAM,GAA4B,QAAQ,CAAC;IAC/C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC5D,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;QACjC,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjF,MAAM,IAAI,GAA4B,EAAE,CAAC;YACzC,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;YACvB,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,QAAmC,CAAC;QAC/C,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;IACxB,OAAO,IAAI,CAAC;AACd,CAAC","debugId":"a5fc9ece-8275-58dd-88d2-a4e0ae48f952"}
|
|
1
|
+
{"version":3,"file":"nested-settings.js","sources":["core/config/nested-settings.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Nested leaf settings exposed via `pm config <scope> set/get <key> <value>`.\n *\n * These are simple string/number leaves of {@link PmSettings} (provider URLs,\n * vector-store adapter, search tuning) that previously required hand-editing\n * `.agents/pm/settings.json`. They live here so the same dotted path is\n * documented in one place and surfaced both to the config dispatcher and to\n * `pm config list` (so `pm config list --json` is discoverable).\n *\n * Shape conventions:\n * - `path` is the dotted JSON path in {@link PmSettings} (e.g. `search.provider`).\n * - `kind` is the value shape: \"string\" | \"boolean\" | \"integer\" | \"number\" | \"ratio\"\n * - \"ratio\" must be a finite number in [0, 1].\n * - \"integer\" must be a finite non-negative integer. Set `min: 1` for keys\n * where the runtime silently falls back when 0 is supplied (e.g. batch\n * size, timeout, max-results limits).\n * - \"number\" must be a finite number — negatives ARE allowed (e.g. score\n * thresholds may legitimately be negative when a provider normalizes\n * scores into a signed range).\n *\n * Adding a key here makes it acceptable to `pm config <scope> set <key> <value>`\n * with no other code changes — the dispatcher walks the dotted path on the\n * already-validated PmSettings shape.\n */\n\nexport type NestedSettingKind = \"string\" | \"boolean\" | \"integer\" | \"number\" | \"ratio\";\n\nexport interface NestedSettingDescriptor {\n /** CLI key (snake_case). Kebab-case form is accepted by normalizing `-` → `_`. */\n key: string;\n /** Dotted JSON path in PmSettings. */\n path: string;\n /** Value shape. */\n kind: NestedSettingKind;\n /** Short human-facing summary for `pm config list`. */\n summary: string;\n /** Optional accepted values for string settings. */\n choices?: readonly string[];\n /** Require a non-empty trimmed string value for string settings. */\n non_empty?: boolean;\n /**\n * Optional minimum value for `integer` / `number` kinds. When set,\n * `parseNestedSettingValue` rejects values strictly below `min`. Useful for\n * settings where 0 would be silently ignored by the runtime (batch sizes,\n * timeouts, max-results limits).\n */\n min?: number;\n}\n\n/**\n * Search/provider/vector-store leaves. Order is the display order in\n * `pm config list` and in error hints.\n */\nexport const NESTED_SETTING_DESCRIPTORS: readonly NestedSettingDescriptor[] = [\n {\n key: \"search_provider\",\n path: \"search.provider\",\n kind: \"string\",\n summary: \"Search embedding provider name (e.g. openai, ollama, or an extension provider).\",\n },\n {\n key: \"search_mutation_refresh_policy\",\n path: \"search.mutation_refresh_policy\",\n kind: \"string\",\n choices: [\"cache_only\", \"semantic_configured\", \"semantic_auto\"],\n summary: \"Mutation-time search refresh policy: cache_only, semantic_configured, or semantic_auto.\",\n },\n {\n key: \"search_query_expansion_enabled\",\n path: \"search.query_expansion.enabled\",\n kind: \"boolean\",\n summary: \"Enable or disable query expansion for semantic/hybrid search.\",\n },\n {\n key: \"search_query_expansion_provider\",\n path: \"search.query_expansion.provider\",\n kind: \"string\",\n summary: \"Query expansion provider name (built-in openai/ollama or extension provider).\",\n },\n {\n key: \"search_rerank_enabled\",\n path: \"search.rerank.enabled\",\n kind: \"boolean\",\n summary: \"Enable or disable post-retrieval reranking for hybrid search.\",\n },\n {\n key: \"search_rerank_model\",\n path: \"search.rerank.model\",\n kind: \"string\",\n summary: \"Rerank model name override used by built-in providers.\",\n },\n {\n key: \"search_rerank_top_k\",\n path: \"search.rerank.top_k\",\n kind: \"integer\",\n min: 1,\n summary: \"Number of top hybrid candidates to rerank when rerank is enabled.\",\n },\n {\n key: \"search_embedding_model\",\n path: \"search.embedding_model\",\n kind: \"string\",\n summary: \"Default embedding model name (overrides provider-specific model when set).\",\n },\n {\n key: \"search_embedding_corpus_max_characters\",\n path: \"search.embedding_corpus_max_characters\",\n kind: \"integer\",\n min: 1,\n summary: \"Maximum semantic corpus characters per item before truncation.\",\n },\n {\n key: \"search_embedding_batch_size\",\n path: \"search.embedding_batch_size\",\n kind: \"integer\",\n min: 1,\n summary: \"Number of items embedded per request batch.\",\n },\n {\n key: \"search_embedding_timeout_ms\",\n path: \"search.embedding_timeout_ms\",\n kind: \"integer\",\n min: 1,\n summary: \"Per-request embedding timeout in milliseconds.\",\n },\n {\n key: \"search_score_threshold\",\n path: \"search.score_threshold\",\n kind: \"number\",\n summary: \"Minimum score for a hit to be returned (0 keeps all matches).\",\n },\n {\n key: \"search_hybrid_semantic_weight\",\n path: \"search.hybrid_semantic_weight\",\n kind: \"ratio\",\n summary: \"Hybrid mode semantic weight in [0, 1] (1-weight goes to keyword).\",\n },\n {\n key: \"search_max_results\",\n path: \"search.max_results\",\n kind: \"integer\",\n min: 1,\n summary: \"Default upper bound on search hits when --limit is not supplied.\",\n },\n {\n key: \"openai_base_url\",\n path: \"providers.openai.base_url\",\n kind: \"string\",\n summary: \"OpenAI-compatible API base URL (LM Studio/vLLM also use this).\",\n },\n {\n key: \"openai_api_key\",\n path: \"providers.openai.api_key\",\n kind: \"string\",\n summary: \"OpenAI-compatible API key.\",\n },\n {\n key: \"openai_model\",\n path: \"providers.openai.model\",\n kind: \"string\",\n summary: \"OpenAI-compatible embedding model name.\",\n },\n {\n key: \"ollama_base_url\",\n path: \"providers.ollama.base_url\",\n kind: \"string\",\n summary: \"Ollama API base URL (typically http://localhost:11434).\",\n },\n {\n key: \"ollama_model\",\n path: \"providers.ollama.model\",\n kind: \"string\",\n summary: \"Ollama embedding model name (e.g. nomic-embed-text).\",\n },\n {\n key: \"vector_store_adapter\",\n path: \"vector_store.adapter\",\n kind: \"string\",\n summary: \"Vector store adapter name (lancedb, qdrant, or an extension adapter).\",\n },\n {\n key: \"vector_store_collection_name\",\n path: \"vector_store.collection_name\",\n kind: \"string\",\n non_empty: true,\n summary: \"Vector collection/table name shared by Qdrant and LanceDB adapters.\",\n },\n {\n key: \"qdrant_url\",\n path: \"vector_store.qdrant.url\",\n kind: \"string\",\n summary: \"Qdrant HTTP API URL.\",\n },\n {\n key: \"qdrant_api_key\",\n path: \"vector_store.qdrant.api_key\",\n kind: \"string\",\n summary: \"Qdrant API key (empty if running unauthenticated).\",\n },\n {\n key: \"lancedb_path\",\n path: \"vector_store.lancedb.path\",\n kind: \"string\",\n summary: \"LanceDB storage path (relative to pm root or absolute).\",\n },\n];\n\nconst DESCRIPTOR_BY_KEY: ReadonlyMap<string, NestedSettingDescriptor> = new Map(\n NESTED_SETTING_DESCRIPTORS.map((descriptor) => [descriptor.key, descriptor]),\n);\n\n/**\n * Map a raw user-supplied key (kebab or snake case, any casing) onto a known\n * nested-leaf descriptor. Returns `undefined` when the key is not a nested\n * leaf (callers can then fall back to the regular ConfigKey path).\n */\nexport function resolveNestedSettingDescriptor(raw: string | undefined): NestedSettingDescriptor | undefined {\n if (typeof raw !== \"string\") {\n return undefined;\n }\n const normalized = raw.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (normalized.length === 0) {\n return undefined;\n }\n return DESCRIPTOR_BY_KEY.get(normalized);\n}\n\n/** Recoverable parsed value with the descriptor it satisfied. */\nexport interface NestedSettingParsedValue {\n descriptor: NestedSettingDescriptor;\n value: string | number | boolean;\n}\n\n/** Throwable validation error returned as a structured result. */\nexport interface NestedSettingParseError {\n message: string;\n}\n\nexport type NestedSettingParseResult =\n | { ok: true; parsed: NestedSettingParsedValue }\n | { ok: false; error: NestedSettingParseError };\n\n/**\n * Validate and coerce a raw string value for a nested-leaf setting. The\n * returned value is the typed leaf that should be written into PmSettings.\n *\n * Empty strings are allowed for \"string\" leaves unless `non_empty` is set.\n */\nexport function parseNestedSettingValue(\n descriptor: NestedSettingDescriptor,\n rawValue: string,\n): NestedSettingParseResult {\n if (typeof rawValue !== \"string\") {\n return { ok: false, error: { message: `Config set ${descriptor.key} requires a string value` } };\n }\n const trimmed = rawValue.trim();\n if (descriptor.kind === \"boolean\") {\n const normalized = trimmed.toLowerCase();\n if (normalized === \"true\" || normalized === \"1\" || normalized === \"yes\" || normalized === \"on\") {\n return { ok: true, parsed: { descriptor, value: true } };\n }\n if (normalized === \"false\" || normalized === \"0\" || normalized === \"no\" || normalized === \"off\") {\n return { ok: true, parsed: { descriptor, value: false } };\n }\n return {\n ok: false,\n error: {\n message: `Config set ${descriptor.key} requires a boolean value (true|false), got \"${rawValue}\"`,\n },\n };\n }\n if (descriptor.kind === \"string\") {\n if (descriptor.non_empty === true && trimmed.length === 0) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a non-empty value` },\n };\n }\n if (descriptor.choices && !descriptor.choices.includes(trimmed)) {\n return {\n ok: false,\n error: {\n message: `Config set ${descriptor.key} must be one of ${descriptor.choices.join(\"|\")}, got \"${rawValue}\"`,\n },\n };\n }\n return { ok: true, parsed: { descriptor, value: trimmed } };\n }\n\n // Number(\"\") === 0, which would silently accept empty / whitespace-only input\n // as a valid zero. Reject explicitly so misconfigurations don't slip through.\n if (trimmed.length === 0) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a non-empty value` },\n };\n }\n\n const parsed = Number(trimmed);\n if (!Number.isFinite(parsed)) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a finite number, got \"${rawValue}\"` },\n };\n }\n if (descriptor.kind === \"integer\") {\n if (!Number.isInteger(parsed) || parsed < 0) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a non-negative integer, got \"${rawValue}\"` },\n };\n }\n if (descriptor.min !== undefined && parsed < descriptor.min) {\n return {\n ok: false,\n error: {\n message: `Config set ${descriptor.key} requires an integer >= ${descriptor.min}, got \"${rawValue}\" (the runtime silently ignores 0 here and falls back to the default)`,\n },\n };\n }\n return { ok: true, parsed: { descriptor, value: parsed } };\n }\n if (descriptor.kind === \"ratio\") {\n if (parsed < 0 || parsed > 1) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a number in [0, 1], got \"${rawValue}\"` },\n };\n }\n return { ok: true, parsed: { descriptor, value: parsed } };\n }\n // kind === \"number\" — negatives are allowed; only apply an explicit `min`.\n if (descriptor.min !== undefined && parsed < descriptor.min) {\n return {\n ok: false,\n error: { message: `Config set ${descriptor.key} requires a number >= ${descriptor.min}, got \"${rawValue}\"` },\n };\n }\n return { ok: true, parsed: { descriptor, value: parsed } };\n}\n\n/** Walk a dotted path on an arbitrary record (best-effort, returns null on miss). */\nexport function readNestedSettingValue(\n settings: unknown,\n descriptor: NestedSettingDescriptor,\n): string | number | boolean | null {\n const segments = descriptor.path.split(\".\");\n let cursor: unknown = settings;\n for (const segment of segments) {\n if (typeof cursor !== \"object\" || cursor === null) {\n return null;\n }\n cursor = (cursor as Record<string, unknown>)[segment];\n }\n if (typeof cursor === \"string\" || typeof cursor === \"number\" || typeof cursor === \"boolean\") {\n return cursor;\n }\n return null;\n}\n\n/**\n * Set a leaf value on a settings object by walking the descriptor's dotted\n * path. Missing intermediate objects are created. Returns `true` when the\n * value actually changed.\n */\nexport function writeNestedSettingValue(\n settings: Record<string, unknown>,\n descriptor: NestedSettingDescriptor,\n value: string | number | boolean,\n): boolean {\n const segments = descriptor.path.split(\".\");\n let cursor: Record<string, unknown> = settings;\n for (let index = 0; index < segments.length - 1; index += 1) {\n const segment = segments[index];\n const existing = cursor[segment];\n if (typeof existing !== \"object\" || existing === null || Array.isArray(existing)) {\n const next: Record<string, unknown> = {};\n cursor[segment] = next;\n cursor = next;\n } else {\n cursor = existing as Record<string, unknown>;\n }\n }\n const leafKey = segments[segments.length - 1];\n const previous = cursor[leafKey];\n if (previous === value) {\n return false;\n }\n cursor[leafKey] = value;\n return true;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA0BH;;;GAGG;;;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAuC;IAC5E;QACE,GAAG,EAAE,iBAAiB;QACtB,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,iFAAiF;KAC3F;IACD;QACE,GAAG,EAAE,gCAAgC;QACrC,IAAI,EAAE,gCAAgC;QACtC,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,CAAC,YAAY,EAAE,qBAAqB,EAAE,eAAe,CAAC;QAC/D,OAAO,EAAE,yFAAyF;KACnG;IACD;QACE,GAAG,EAAE,gCAAgC;QACrC,IAAI,EAAE,gCAAgC;QACtC,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,+DAA+D;KACzE;IACD;QACE,GAAG,EAAE,iCAAiC;QACtC,IAAI,EAAE,iCAAiC;QACvC,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,+EAA+E;KACzF;IACD;QACE,GAAG,EAAE,uBAAuB;QAC5B,IAAI,EAAE,uBAAuB;QAC7B,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,+DAA+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KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC5D,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;QACjC,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjF,MAAM,IAAI,GAA4B,EAAE,CAAC;YACzC,MAAM,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;YACvB,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,QAAmC,CAAC;QAC/C,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC9C,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IACjC,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;QACvB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;IACxB,OAAO,IAAI,CAAC;AACd,CAAC","debugId":"1bb81b8a-b034-5aec-aa16-d395bac81342"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* good error messages.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
!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]="
|
|
13
|
+
!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]="9ef209a1-6efd-5b62-a1a7-1e6736aced5a")}catch(e){}}();
|
|
14
14
|
const FORMAT_KEYS = new Set(["item_format"]);
|
|
15
15
|
const CRITERIA_KEYS = new Set([
|
|
16
16
|
"definition_of_done",
|
|
@@ -29,6 +29,7 @@ const POLICY_KEYS = new Set([
|
|
|
29
29
|
"governance_ownership_enforcement",
|
|
30
30
|
"governance_create_mode_default",
|
|
31
31
|
"governance_close_validation_default",
|
|
32
|
+
"governance_require_close_reason",
|
|
32
33
|
"governance_create_default_type",
|
|
33
34
|
"governance_workflow_enforcement",
|
|
34
35
|
"governance_parent_reference_policy",
|
|
@@ -43,6 +44,7 @@ const POLICY_KEYS = new Set([
|
|
|
43
44
|
* their own validators report the precise allowed set.
|
|
44
45
|
*/
|
|
45
46
|
const ENABLED_DISABLED_POLICY_KEYS = new Set([
|
|
47
|
+
"governance_require_close_reason",
|
|
46
48
|
"governance_force_required_for_stale_lock",
|
|
47
49
|
"test_result_tracking",
|
|
48
50
|
"telemetry_tracking",
|
|
@@ -108,4 +110,4 @@ export function resolveConfigPositionalValue(canonicalKeyOrAlias, value) {
|
|
|
108
110
|
return { routable: true, flag: "policy", value: policyValue };
|
|
109
111
|
}
|
|
110
112
|
//# sourceMappingURL=positional-value.js.map
|
|
111
|
-
//# debugId=
|
|
113
|
+
//# debugId=9ef209a1-6efd-5b62-a1a7-1e6736aced5a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"positional-value.js","sources":["core/config/positional-value.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Pure routing helper for the optional positional `value` argument of `pm config set`.\n *\n * `pm config set <key> <value>` is the intuitive form agents reach for, but config\n * VALUES are actually carried by typed flags (`--format`, `--policy`, `--criterion`).\n * This module maps a config key (kebab or snake form, canonical or alias) plus a raw\n * positional value onto the typed flag it should populate, applying enabled/disabled\n * synonyms (off/on/true/false) for boolean-style policy keys. The existing per-key\n * validators in config.ts still run on the routed value, so bad values keep their\n * good error messages.\n */\n\n/** The typed flag a positional value routes to. */\nexport type ConfigPositionalFlag = \"format\" | \"policy\" | \"criterion\";\n\n/** Successful routing of a positional value to a single-value typed flag. */\nexport interface ConfigPositionalScalarRouted {\n routable: true;\n flag: \"format\" | \"policy\";\n /** Normalized scalar value for single-value flags. */\n value: string;\n}\n\n/** Successful routing of a positional value to the criteria-list flag. */\nexport interface ConfigPositionalListRouted {\n routable: true;\n flag: \"criterion\";\n /** Criteria-list flag (`--criterion`) value, supplied as a values array. */\n values: string[];\n}\n\nexport type ConfigPositionalRouted = ConfigPositionalScalarRouted | ConfigPositionalListRouted;\n\n/** A key whose value cannot be carried by a single positional (e.g. `context`). */\nexport interface ConfigPositionalNotRoutable {\n routable: false;\n /** Human/agent-facing reason + the flags to use instead. */\n reason: string;\n}\n\nexport type ConfigPositionalResult = ConfigPositionalRouted | ConfigPositionalNotRoutable;\n\n/** Canonical snake-case config keys this helper understands. */\ntype CanonicalConfigKey =\n | \"definition_of_done\"\n | \"item_format\"\n | \"history_missing_stream_policy\"\n | \"sprint_release_format_policy\"\n | \"parent_reference_policy\"\n | \"metadata_validation_profile\"\n | \"metadata_required_fields\"\n | \"lifecycle_stale_blocker_reason_patterns\"\n | \"lifecycle_closure_like_blocked_reason_patterns\"\n | \"lifecycle_closure_like_resolution_patterns\"\n | \"lifecycle_closure_like_actual_result_patterns\"\n | \"governance_preset\"\n | \"governance_ownership_enforcement\"\n | \"governance_create_mode_default\"\n | \"governance_close_validation_default\"\n | \"governance_create_default_type\"\n | \"governance_workflow_enforcement\"\n | \"governance_parent_reference_policy\"\n | \"governance_metadata_validation_profile\"\n | \"governance_force_required_for_stale_lock\"\n | \"test_result_tracking\"\n | \"telemetry_tracking\"\n | \"context\";\n\nconst FORMAT_KEYS: ReadonlySet<CanonicalConfigKey> = new Set<CanonicalConfigKey>([\"item_format\"]);\n\nconst CRITERIA_KEYS: ReadonlySet<CanonicalConfigKey> = new Set<CanonicalConfigKey>([\n \"definition_of_done\",\n \"metadata_required_fields\",\n \"lifecycle_stale_blocker_reason_patterns\",\n \"lifecycle_closure_like_blocked_reason_patterns\",\n \"lifecycle_closure_like_resolution_patterns\",\n \"lifecycle_closure_like_actual_result_patterns\",\n]);\n\nconst POLICY_KEYS: ReadonlySet<CanonicalConfigKey> = new Set<CanonicalConfigKey>([\n \"history_missing_stream_policy\",\n \"sprint_release_format_policy\",\n \"parent_reference_policy\",\n \"metadata_validation_profile\",\n \"governance_preset\",\n \"governance_ownership_enforcement\",\n \"governance_create_mode_default\",\n \"governance_close_validation_default\",\n \"governance_create_default_type\",\n \"governance_workflow_enforcement\",\n \"governance_parent_reference_policy\",\n \"governance_metadata_validation_profile\",\n \"governance_force_required_for_stale_lock\",\n \"test_result_tracking\",\n \"telemetry_tracking\",\n]);\n\n/**\n * Policy keys whose only valid values are enabled/disabled. For these we accept the\n * intuitive synonyms off/on/true/false. Other policy keys pass through unchanged so\n * their own validators report the precise allowed set.\n */\nconst ENABLED_DISABLED_POLICY_KEYS: ReadonlySet<CanonicalConfigKey> = new Set<CanonicalConfigKey>([\n \"governance_force_required_for_stale_lock\",\n \"test_result_tracking\",\n \"telemetry_tracking\",\n]);\n\nconst ENABLED_DISABLED_SYNONYMS: Record<string, string> = {\n off: \"disabled\",\n on: \"enabled\",\n true: \"enabled\",\n false: \"disabled\",\n enabled: \"enabled\",\n disabled: \"disabled\",\n};\n\n/** Normalize any kebab/snake key form to the canonical snake key (or undefined). */\nfunction toCanonicalKey(keyOrAlias: string): CanonicalConfigKey | undefined {\n const normalized = keyOrAlias.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (\n FORMAT_KEYS.has(normalized as CanonicalConfigKey) ||\n CRITERIA_KEYS.has(normalized as CanonicalConfigKey) ||\n POLICY_KEYS.has(normalized as CanonicalConfigKey) ||\n normalized === \"context\"\n ) {\n return normalized as CanonicalConfigKey;\n }\n return undefined;\n}\n\n/**\n * Map an enabled/disabled-style value through its synonyms (case-insensitive). Values\n * that are not synonyms pass through unchanged so the downstream validator can reject\n * them with its own message.\n */\nfunction normalizeEnabledDisabled(value: string): string {\n const normalized = value.trim().toLowerCase();\n return ENABLED_DISABLED_SYNONYMS[normalized] ?? value;\n}\n\n/**\n * Resolve which typed flag a positional `pm config set <key> <value>` value should\n * populate, plus the normalized value.\n *\n * Returns `{ routable: false, reason }` for keys that require multiple/structured\n * flags (e.g. `context`). Unknown keys also return `routable: false` so the caller\n * can fall back to the existing invalid-key path.\n */\nexport function resolveConfigPositionalValue(\n canonicalKeyOrAlias: string,\n value: string,\n): ConfigPositionalResult {\n const key = toCanonicalKey(canonicalKeyOrAlias);\n if (key === undefined) {\n return {\n routable: false,\n reason: `Unknown config key \"${canonicalKeyOrAlias}\" cannot route a positional value.`,\n };\n }\n\n if (key === \"context\") {\n return {\n routable: false,\n reason:\n 'Config set context does not accept a positional value. Use --default-depth, --activity-limit, --stale-threshold-days, or --section-<name> flags.',\n };\n }\n\n if (FORMAT_KEYS.has(key)) {\n return { routable: true, flag: \"format\", value };\n }\n\n if (CRITERIA_KEYS.has(key)) {\n return { routable: true, flag: \"criterion\", values: [value] };\n }\n\n // policy key\n const policyValue = ENABLED_DISABLED_POLICY_KEYS.has(key) ? normalizeEnabledDisabled(value) : value;\n return { routable: true, flag: \"policy\", value: policyValue };\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;;
|
|
1
|
+
{"version":3,"file":"positional-value.js","sources":["core/config/positional-value.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Pure routing helper for the optional positional `value` argument of `pm config set`.\n *\n * `pm config set <key> <value>` is the intuitive form agents reach for, but config\n * VALUES are actually carried by typed flags (`--format`, `--policy`, `--criterion`).\n * This module maps a config key (kebab or snake form, canonical or alias) plus a raw\n * positional value onto the typed flag it should populate, applying enabled/disabled\n * synonyms (off/on/true/false) for boolean-style policy keys. The existing per-key\n * validators in config.ts still run on the routed value, so bad values keep their\n * good error messages.\n */\n\n/** The typed flag a positional value routes to. */\nexport type ConfigPositionalFlag = \"format\" | \"policy\" | \"criterion\";\n\n/** Successful routing of a positional value to a single-value typed flag. */\nexport interface ConfigPositionalScalarRouted {\n routable: true;\n flag: \"format\" | \"policy\";\n /** Normalized scalar value for single-value flags. */\n value: string;\n}\n\n/** Successful routing of a positional value to the criteria-list flag. */\nexport interface ConfigPositionalListRouted {\n routable: true;\n flag: \"criterion\";\n /** Criteria-list flag (`--criterion`) value, supplied as a values array. */\n values: string[];\n}\n\nexport type ConfigPositionalRouted = ConfigPositionalScalarRouted | ConfigPositionalListRouted;\n\n/** A key whose value cannot be carried by a single positional (e.g. `context`). */\nexport interface ConfigPositionalNotRoutable {\n routable: false;\n /** Human/agent-facing reason + the flags to use instead. */\n reason: string;\n}\n\nexport type ConfigPositionalResult = ConfigPositionalRouted | ConfigPositionalNotRoutable;\n\n/** Canonical snake-case config keys this helper understands. */\ntype CanonicalConfigKey =\n | \"definition_of_done\"\n | \"item_format\"\n | \"history_missing_stream_policy\"\n | \"sprint_release_format_policy\"\n | \"parent_reference_policy\"\n | \"metadata_validation_profile\"\n | \"metadata_required_fields\"\n | \"lifecycle_stale_blocker_reason_patterns\"\n | \"lifecycle_closure_like_blocked_reason_patterns\"\n | \"lifecycle_closure_like_resolution_patterns\"\n | \"lifecycle_closure_like_actual_result_patterns\"\n | \"governance_preset\"\n | \"governance_ownership_enforcement\"\n | \"governance_create_mode_default\"\n | \"governance_close_validation_default\"\n | \"governance_require_close_reason\"\n | \"governance_create_default_type\"\n | \"governance_workflow_enforcement\"\n | \"governance_parent_reference_policy\"\n | \"governance_metadata_validation_profile\"\n | \"governance_force_required_for_stale_lock\"\n | \"test_result_tracking\"\n | \"telemetry_tracking\"\n | \"context\";\n\nconst FORMAT_KEYS: ReadonlySet<CanonicalConfigKey> = new Set<CanonicalConfigKey>([\"item_format\"]);\n\nconst CRITERIA_KEYS: ReadonlySet<CanonicalConfigKey> = new Set<CanonicalConfigKey>([\n \"definition_of_done\",\n \"metadata_required_fields\",\n \"lifecycle_stale_blocker_reason_patterns\",\n \"lifecycle_closure_like_blocked_reason_patterns\",\n \"lifecycle_closure_like_resolution_patterns\",\n \"lifecycle_closure_like_actual_result_patterns\",\n]);\n\nconst POLICY_KEYS: ReadonlySet<CanonicalConfigKey> = new Set<CanonicalConfigKey>([\n \"history_missing_stream_policy\",\n \"sprint_release_format_policy\",\n \"parent_reference_policy\",\n \"metadata_validation_profile\",\n \"governance_preset\",\n \"governance_ownership_enforcement\",\n \"governance_create_mode_default\",\n \"governance_close_validation_default\",\n \"governance_require_close_reason\",\n \"governance_create_default_type\",\n \"governance_workflow_enforcement\",\n \"governance_parent_reference_policy\",\n \"governance_metadata_validation_profile\",\n \"governance_force_required_for_stale_lock\",\n \"test_result_tracking\",\n \"telemetry_tracking\",\n]);\n\n/**\n * Policy keys whose only valid values are enabled/disabled. For these we accept the\n * intuitive synonyms off/on/true/false. Other policy keys pass through unchanged so\n * their own validators report the precise allowed set.\n */\nconst ENABLED_DISABLED_POLICY_KEYS: ReadonlySet<CanonicalConfigKey> = new Set<CanonicalConfigKey>([\n \"governance_require_close_reason\",\n \"governance_force_required_for_stale_lock\",\n \"test_result_tracking\",\n \"telemetry_tracking\",\n]);\n\nconst ENABLED_DISABLED_SYNONYMS: Record<string, string> = {\n off: \"disabled\",\n on: \"enabled\",\n true: \"enabled\",\n false: \"disabled\",\n enabled: \"enabled\",\n disabled: \"disabled\",\n};\n\n/** Normalize any kebab/snake key form to the canonical snake key (or undefined). */\nfunction toCanonicalKey(keyOrAlias: string): CanonicalConfigKey | undefined {\n const normalized = keyOrAlias.trim().toLowerCase().replaceAll(\"-\", \"_\");\n if (\n FORMAT_KEYS.has(normalized as CanonicalConfigKey) ||\n CRITERIA_KEYS.has(normalized as CanonicalConfigKey) ||\n POLICY_KEYS.has(normalized as CanonicalConfigKey) ||\n normalized === \"context\"\n ) {\n return normalized as CanonicalConfigKey;\n }\n return undefined;\n}\n\n/**\n * Map an enabled/disabled-style value through its synonyms (case-insensitive). Values\n * that are not synonyms pass through unchanged so the downstream validator can reject\n * them with its own message.\n */\nfunction normalizeEnabledDisabled(value: string): string {\n const normalized = value.trim().toLowerCase();\n return ENABLED_DISABLED_SYNONYMS[normalized] ?? value;\n}\n\n/**\n * Resolve which typed flag a positional `pm config set <key> <value>` value should\n * populate, plus the normalized value.\n *\n * Returns `{ routable: false, reason }` for keys that require multiple/structured\n * flags (e.g. `context`). Unknown keys also return `routable: false` so the caller\n * can fall back to the existing invalid-key path.\n */\nexport function resolveConfigPositionalValue(\n canonicalKeyOrAlias: string,\n value: string,\n): ConfigPositionalResult {\n const key = toCanonicalKey(canonicalKeyOrAlias);\n if (key === undefined) {\n return {\n routable: false,\n reason: `Unknown config key \"${canonicalKeyOrAlias}\" cannot route a positional value.`,\n };\n }\n\n if (key === \"context\") {\n return {\n routable: false,\n reason:\n 'Config set context does not accept a positional value. Use --default-depth, --activity-limit, --stale-threshold-days, or --section-<name> flags.',\n };\n }\n\n if (FORMAT_KEYS.has(key)) {\n return { routable: true, flag: \"format\", value };\n }\n\n if (CRITERIA_KEYS.has(key)) {\n return { routable: true, flag: \"criterion\", values: [value] };\n }\n\n // policy key\n const policyValue = ENABLED_DISABLED_POLICY_KEYS.has(key) ? normalizeEnabledDisabled(value) : value;\n return { routable: true, flag: \"policy\", value: policyValue };\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;;;AA2DH,MAAM,WAAW,GAAoC,IAAI,GAAG,CAAqB,CAAC,aAAa,CAAC,CAAC,CAAC;AAElG,MAAM,aAAa,GAAoC,IAAI,GAAG,CAAqB;IACjF,oBAAoB;IACpB,0BAA0B;IAC1B,yCAAyC;IACzC,gDAAgD;IAChD,4CAA4C;IAC5C,+CAA+C;CAChD,CAAC,CAAC;AAEH,MAAM,WAAW,GAAoC,IAAI,GAAG,CAAqB;IAC/E,+BAA+B;IAC/B,8BAA8B;IAC9B,yBAAyB;IACzB,6BAA6B;IAC7B,mBAAmB;IACnB,kC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K,SAAS,EAAE,CAAC;QACtB,OAAO;YACL,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,uBAAuB,mBAAmB,oCAAoC;SACvF,CAAC;IACJ,CAAC;IAED,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO;YACL,QAAQ,EAAE,KAAK;YACf,MAAM,EACJ,kJAAkJ;SACrJ,CAAC;IACJ,CAAC;IAED,IAAI,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACnD,CAAC;IAED,IAAI,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;IAChE,CAAC;IAED,aAAa;IACb,MAAM,WAAW,GAAG,4BAA4B,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACpG,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AAChE,CAAC","debugId":"9ef209a1-6efd-5b62-a1a7-1e6736aced5a"}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* intentionally excluded here (see pm-0hnu: "all non-extension checks").
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
!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]="
|
|
27
|
+
!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]="88ac4364-7d22-5199-8b9b-c6f40eb50d8b")}catch(e){}}();
|
|
28
28
|
export const REMEDIATION_REGISTRY = Object.freeze([
|
|
29
29
|
// --- pm health: directories ---
|
|
30
30
|
{
|
|
@@ -85,6 +85,11 @@ export const REMEDIATION_REGISTRY = Object.freeze([
|
|
|
85
85
|
command: "pm health --check-telemetry",
|
|
86
86
|
summary: "The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only.",
|
|
87
87
|
},
|
|
88
|
+
{
|
|
89
|
+
code: "telemetry_schema_version_behind",
|
|
90
|
+
command: "pm health --check-telemetry",
|
|
91
|
+
summary: "Client schema is behind server; upgrade pm-cli to emit the latest event shape.",
|
|
92
|
+
},
|
|
88
93
|
// --- pm health: integrity ---
|
|
89
94
|
{
|
|
90
95
|
code: "integrity_item_unreadable",
|
|
@@ -325,4 +330,4 @@ export function buildRemediationCommands(warnings) {
|
|
|
325
330
|
return Object.values(buildRemediationMap(warnings));
|
|
326
331
|
}
|
|
327
332
|
//# sourceMappingURL=remediation.js.map
|
|
328
|
-
//# debugId=
|
|
333
|
+
//# debugId=88ac4364-7d22-5199-8b9b-c6f40eb50d8b
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remediation.js","sources":["core/diagnostics/remediation.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Shared machine-executable remediation registry.\n *\n * `pm health` and `pm validate` both emit stable, colon-delimited warning tokens\n * (for example `history_drift_missing_stream:pm-abcd` or\n * `validate_resolution_missing_fields:3`). Agents that gate on these commands\n * previously had to hardcode the mapping from a warning code to the `pm` command\n * that fixes it. This module is the single source of truth for that mapping so\n * `pm health --json` (per-check `remediation_map`) and `pm validate --fix-hints`\n * (per-check `fix_hints`) can both surface executable remediation without any\n * duplicated, drift-prone lookup tables.\n *\n * Semantics of {@link RemediationEntry.command}: the suggested next `pm` command\n * an operator/agent should run to resolve findings with that code. Per-item\n * findings use an `<id>` placeholder (callers that have the concrete id may\n * substitute it); findings whose only fix is a manual file edit point at the\n * most useful diagnostic/repair command and describe the manual step in\n * {@link RemediationEntry.summary}.\n */\n\nexport interface RemediationEntry {\n /**\n * Stable warning-code prefix this entry resolves. A warning matches when it\n * equals this code or begins with `<code>:`. Registry codes are mutually\n * exclusive under that colon-boundary rule (no code is a `:`-delimited prefix\n * of another — e.g. `settings:id_prefix_empty` is distinct from a bare\n * `settings`, which is intentionally not registered), so `resolveRemediation`\n * uses first-match with no ordering dependency.\n */\n readonly code: string;\n /** Executable `pm` command (or imperative) that resolves the finding. May contain an `<id>` placeholder. */\n readonly command: string;\n /** One-line description of what the command does / which manual step it covers. */\n readonly summary: string;\n}\n\n/**\n * Registry of every non-extension `pm health` / `pm validate` warning code and\n * its remediation. Extension findings keep their richer, contextual\n * `details.triage.remediation` produced by the extension health triage and are\n * intentionally excluded here (see pm-0hnu: \"all non-extension checks\").\n */\nexport const REMEDIATION_REGISTRY: readonly RemediationEntry[] = Object.freeze([\n // --- pm health: directories ---\n {\n code: \"missing_directory\",\n command: \"pm init\",\n summary: \"Recreate missing tracker directories (pm init is idempotent and restores the scaffold).\",\n },\n // --- pm health: settings (read/parse) ---\n {\n code: \"settings_read_invalid_json\",\n command: \"pm config list --json\",\n summary:\n \"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run.\",\n },\n {\n code: \"settings_read_invalid_schema\",\n command: \"pm config list --json\",\n summary:\n \"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run.\",\n },\n {\n code: \"settings_read_merge_failed\",\n command: \"pm config list --json\",\n summary: \"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files.\",\n },\n // --- pm health: settings_values ---\n {\n code: \"settings:id_prefix_empty\",\n command: \"pm config list --json\",\n summary: 'id_prefix is empty; set a non-empty \"id_prefix\" in settings.json so generated item ids are well-formed.',\n },\n {\n code: \"settings:locks_ttl_non_positive\",\n command: \"pm config list --json\",\n summary: 'locks.ttl_seconds must be positive; set a positive \"locks.ttl_seconds\" in settings.json.',\n },\n // --- pm health: telemetry (advisory) ---\n {\n code: \"telemetry_state_invalid_json\",\n command: \"pm health --check-telemetry\",\n summary: \"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_invalid_rows\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_pending\",\n command: \"pm health --check-telemetry\",\n summary: \"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_failed\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_http_status\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only.\",\n },\n // --- pm health: integrity ---\n {\n code: \"integrity_item_unreadable\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file could not be read; restore or repair the file at the reported path.\",\n },\n {\n code: \"integrity_item_parse_failed\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file failed to parse; fix the malformed front matter at the reported path.\",\n },\n {\n code: \"integrity_item_conflict_marker\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line.\",\n },\n {\n code: \"integrity_history_unreadable\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream could not be read; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_invalid_json\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains invalid JSON; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_conflict_marker\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain.\",\n },\n // --- pm health: history_drift ---\n {\n code: \"history_drift_missing_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item has no history stream; re-anchor the chain to rebuild it.\",\n },\n {\n code: \"history_drift_unreadable_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history stream is unreadable; re-anchor the chain.\",\n },\n {\n code: \"history_drift_hash_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's content hash no longer matches its history; re-anchor the chain.\",\n },\n {\n code: \"history_drift_chain_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history chain is broken; re-anchor the chain.\",\n },\n // --- pm health: vectorization ---\n {\n code: \"vectorization_stale_items_remaining\",\n command: \"pm health --refresh-vectors\",\n summary: \"Some items have stale embeddings; refresh vectors so semantic search results stay current.\",\n },\n // --- pm validate: metadata ---\n // Note: validate_metadata_missing_author has no entry on purpose. `pm update\n // --author` sets the mutation/audit author (history), not the item's\n // `metadata.author` front-matter field, and there is no CLI flag that writes\n // that field — so emitting a command here would record an audit entry without\n // clearing the finding. A missing item author must be restored at the source.\n {\n code: \"validate_metadata_missing_acceptance_criteria\",\n command: 'pm update <id> --acceptance-criteria \"<criteria>\"',\n summary: \"Backfill the missing acceptance criteria on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_estimate\",\n command: 'pm update <id> --estimate \"<estimate>\"',\n summary: \"Backfill the missing estimate on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_close_reason\",\n command: 'pm update <id> --close-reason \"<reason>\"',\n summary: \"Backfill the missing close reason on the reported closed item(s).\",\n },\n {\n code: \"validate_metadata_missing_reviewer\",\n command: 'pm update <id> --reviewer \"<name>\"',\n summary: \"Backfill the missing reviewer on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_risk\",\n command: 'pm update <id> --risk \"<level>\"',\n summary: \"Backfill the missing risk on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_confidence\",\n command: 'pm update <id> --confidence \"<level>\"',\n summary: \"Backfill the missing confidence on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_sprint\",\n command: 'pm update <id> --sprint \"<sprint>\"',\n summary: \"Backfill the missing sprint on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_release\",\n command: 'pm update <id> --release \"<release>\"',\n summary: \"Backfill the missing release on the reported item(s).\",\n },\n {\n code: \"validate_metadata_custom_profile_missing_required_fields\",\n command: 'pm config set metadata-required-fields --criterion \"<field>\"',\n summary:\n \"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items.\",\n },\n // --- pm validate: resolution ---\n {\n code: \"validate_resolution_missing_fields\",\n command: 'pm update <id> --resolution \"<how resolved>\"',\n summary: \"Backfill resolution / expected_result / actual_result on the reported closed item(s).\",\n },\n // --- pm validate: lifecycle ---\n {\n code: \"validate_lifecycle_active_closure_like_metadata\",\n command: \"pm update <id> --unset <closure-like-field>\",\n summary:\n \"Clear the closure-like field the validator flags on this active item — the detail row names it (resolution / actual-result / blocked-reason) — or close the item if it is actually done.\",\n },\n {\n code: \"validate_lifecycle_active_terminal_parent\",\n command: \"pm update <id> --parent <active-parent-id>\",\n summary: \"Reopen the terminal parent or move the active child under a non-terminal parent.\",\n },\n {\n code: \"validate_lifecycle_stale_blockers\",\n command: \"pm update <id> --unset blocked-by --unset blocked-reason\",\n summary:\n \"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles_error\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n // --- pm validate: files ---\n {\n code: \"validate_files_missing_linked_paths\",\n command: \"pm <files|docs> <id> --remove <path>\",\n summary:\n \"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc).\",\n },\n {\n code: \"validate_files_orphaned_paths\",\n command: \"pm <files|docs> <id> --add <path>\",\n summary:\n \"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace.\",\n },\n {\n code: \"validate_files_tracked_all_strict_forces_pm_internals\",\n command: \"pm validate --check-files --include-pm-internals\",\n summary: \"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode.\",\n },\n // --- pm validate: history_drift ---\n {\n code: \"validate_history_drift_missing_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items missing a history stream.\",\n },\n {\n code: \"validate_history_drift_unreadable_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with an unreadable history stream.\",\n },\n {\n code: \"validate_history_drift_hash_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items whose content hash drifted.\",\n },\n {\n code: \"validate_history_drift_chain_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with a broken history chain.\",\n },\n // --- pm validate: command_references ---\n {\n code: \"validate_command_references_stale_pm_ids\",\n command: 'pm update <id> --replace-tests --test \"command=<corrected-command>\" [--test ...]',\n summary:\n \"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call.\",\n },\n]);\n\n/**\n * Resolve the remediation entry for a warning token, or `undefined` when no\n * entry is registered. A warning matches an entry when it equals the entry code\n * or begins with `<code>:` (the colon boundary keeps sibling codes such as\n * `validate_lifecycle_dependency_cycles` and\n * `validate_lifecycle_dependency_cycles_error` disjoint).\n *\n * First match is intentional and correct: registry codes are mutually exclusive\n * under the colon-boundary rule, so at most one entry can ever match a warning\n * and order is irrelevant. That invariant is enforced by a test (see\n * remediation-registry.spec.ts \"keeps every registry code mutually exclusive\"),\n * which is why this stays a simple linear scan rather than a longest-prefix\n * search — a longest-prefix tie-break is unreachable with disjoint codes.\n *\n * Accepts unknown input defensively (this is an exported helper SDK consumers\n * may call from untyped JS): a non-string `warning` resolves to `undefined`.\n */\nexport function resolveRemediation(warning: string): RemediationEntry | undefined {\n if (typeof warning !== \"string\") {\n return undefined;\n }\n const normalized = warning.trim();\n for (const entry of REMEDIATION_REGISTRY) {\n if (normalized === entry.code || normalized.startsWith(`${entry.code}:`)) {\n return entry;\n }\n }\n return undefined;\n}\n\n/**\n * Build a compact `remediation_map` (code -> command) for a set of warning\n * tokens. First match wins per code; unknown codes are skipped. Used by\n * `pm health --json` per-check details and as the source of deduped executable\n * commands for `pm validate --fix-hints`.\n */\nexport function buildRemediationMap(warnings: Iterable<string>): Record<string, string> {\n const map: Record<string, string> = {};\n for (const warning of warnings) {\n const entry = resolveRemediation(warning);\n if (entry !== undefined && !Object.prototype.hasOwnProperty.call(map, entry.code)) {\n map[entry.code] = entry.command;\n }\n }\n return map;\n}\n\n/**\n * Build a deduped, ordered list of executable remediation commands for a set of\n * warning tokens (one command per distinct matched code). Used by\n * `pm validate --fix-hints` for checks that do not already emit per-row\n * remediation commands.\n */\nexport function buildRemediationCommands(warnings: Iterable<string>): string[] {\n return Object.values(buildRemediationMap(warnings));\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAkBH;;;;;GAKG;;;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAgC,MAAM,CAAC,MAAM,CAAC;IAC7E,iCAAiC;IACjC;QACE,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,yFAAyF;KACnG;IACD,2CAA2C;IAC3C;QACE,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,uHAAuH;KAC1H;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,yHAAyH;KAC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,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAA0B;IACjE,OAAO,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;AACtD,CAAC","debugId":"e7af63b5-6c1c-55f2-bafc-027531d5725f"}
|
|
1
|
+
{"version":3,"file":"remediation.js","sources":["core/diagnostics/remediation.ts"],"sourceRoot":"/","sourcesContent":["/**\n * Shared machine-executable remediation registry.\n *\n * `pm health` and `pm validate` both emit stable, colon-delimited warning tokens\n * (for example `history_drift_missing_stream:pm-abcd` or\n * `validate_resolution_missing_fields:3`). Agents that gate on these commands\n * previously had to hardcode the mapping from a warning code to the `pm` command\n * that fixes it. This module is the single source of truth for that mapping so\n * `pm health --json` (per-check `remediation_map`) and `pm validate --fix-hints`\n * (per-check `fix_hints`) can both surface executable remediation without any\n * duplicated, drift-prone lookup tables.\n *\n * Semantics of {@link RemediationEntry.command}: the suggested next `pm` command\n * an operator/agent should run to resolve findings with that code. Per-item\n * findings use an `<id>` placeholder (callers that have the concrete id may\n * substitute it); findings whose only fix is a manual file edit point at the\n * most useful diagnostic/repair command and describe the manual step in\n * {@link RemediationEntry.summary}.\n */\n\nexport interface RemediationEntry {\n /**\n * Stable warning-code prefix this entry resolves. A warning matches when it\n * equals this code or begins with `<code>:`. Registry codes are mutually\n * exclusive under that colon-boundary rule (no code is a `:`-delimited prefix\n * of another — e.g. `settings:id_prefix_empty` is distinct from a bare\n * `settings`, which is intentionally not registered), so `resolveRemediation`\n * uses first-match with no ordering dependency.\n */\n readonly code: string;\n /** Executable `pm` command (or imperative) that resolves the finding. May contain an `<id>` placeholder. */\n readonly command: string;\n /** One-line description of what the command does / which manual step it covers. */\n readonly summary: string;\n}\n\n/**\n * Registry of every non-extension `pm health` / `pm validate` warning code and\n * its remediation. Extension findings keep their richer, contextual\n * `details.triage.remediation` produced by the extension health triage and are\n * intentionally excluded here (see pm-0hnu: \"all non-extension checks\").\n */\nexport const REMEDIATION_REGISTRY: readonly RemediationEntry[] = Object.freeze([\n // --- pm health: directories ---\n {\n code: \"missing_directory\",\n command: \"pm init\",\n summary: \"Recreate missing tracker directories (pm init is idempotent and restores the scaffold).\",\n },\n // --- pm health: settings (read/parse) ---\n {\n code: \"settings_read_invalid_json\",\n command: \"pm config list --json\",\n summary:\n \"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run.\",\n },\n {\n code: \"settings_read_invalid_schema\",\n command: \"pm config list --json\",\n summary:\n \"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run.\",\n },\n {\n code: \"settings_read_merge_failed\",\n command: \"pm config list --json\",\n summary: \"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files.\",\n },\n // --- pm health: settings_values ---\n {\n code: \"settings:id_prefix_empty\",\n command: \"pm config list --json\",\n summary: 'id_prefix is empty; set a non-empty \"id_prefix\" in settings.json so generated item ids are well-formed.',\n },\n {\n code: \"settings:locks_ttl_non_positive\",\n command: \"pm config list --json\",\n summary: 'locks.ttl_seconds must be positive; set a positive \"locks.ttl_seconds\" in settings.json.',\n },\n // --- pm health: telemetry (advisory) ---\n {\n code: \"telemetry_state_invalid_json\",\n command: \"pm health --check-telemetry\",\n summary: \"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_invalid_rows\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only.\",\n },\n {\n code: \"telemetry_queue_pending\",\n command: \"pm health --check-telemetry\",\n summary: \"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_failed\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_endpoint_probe_http_status\",\n command: \"pm health --check-telemetry\",\n summary: \"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only.\",\n },\n {\n code: \"telemetry_schema_version_behind\",\n command: \"pm health --check-telemetry\",\n summary: \"Client schema is behind server; upgrade pm-cli to emit the latest event shape.\",\n },\n // --- pm health: integrity ---\n {\n code: \"integrity_item_unreadable\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file could not be read; restore or repair the file at the reported path.\",\n },\n {\n code: \"integrity_item_parse_failed\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file failed to parse; fix the malformed front matter at the reported path.\",\n },\n {\n code: \"integrity_item_conflict_marker\",\n command: \"pm validate --check-files --verbose-diagnostics\",\n summary: \"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line.\",\n },\n {\n code: \"integrity_history_unreadable\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream could not be read; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_invalid_json\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains invalid JSON; re-anchor the affected item's history chain.\",\n },\n {\n code: \"integrity_history_conflict_marker\",\n command: \"pm history-repair <id>\",\n summary: \"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain.\",\n },\n // --- pm health: history_drift ---\n {\n code: \"history_drift_missing_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item has no history stream; re-anchor the chain to rebuild it.\",\n },\n {\n code: \"history_drift_unreadable_stream\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history stream is unreadable; re-anchor the chain.\",\n },\n {\n code: \"history_drift_hash_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's content hash no longer matches its history; re-anchor the chain.\",\n },\n {\n code: \"history_drift_chain_mismatch\",\n command: \"pm history-repair <id>\",\n summary: \"The item's history chain is broken; re-anchor the chain.\",\n },\n // --- pm health: vectorization ---\n {\n code: \"vectorization_stale_items_remaining\",\n command: \"pm health --refresh-vectors\",\n summary: \"Some items have stale embeddings; refresh vectors so semantic search results stay current.\",\n },\n // --- pm validate: metadata ---\n // Note: validate_metadata_missing_author has no entry on purpose. `pm update\n // --author` sets the mutation/audit author (history), not the item's\n // `metadata.author` front-matter field, and there is no CLI flag that writes\n // that field — so emitting a command here would record an audit entry without\n // clearing the finding. A missing item author must be restored at the source.\n {\n code: \"validate_metadata_missing_acceptance_criteria\",\n command: 'pm update <id> --acceptance-criteria \"<criteria>\"',\n summary: \"Backfill the missing acceptance criteria on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_estimate\",\n command: 'pm update <id> --estimate \"<estimate>\"',\n summary: \"Backfill the missing estimate on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_close_reason\",\n command: 'pm update <id> --close-reason \"<reason>\"',\n summary: \"Backfill the missing close reason on the reported closed item(s).\",\n },\n {\n code: \"validate_metadata_missing_reviewer\",\n command: 'pm update <id> --reviewer \"<name>\"',\n summary: \"Backfill the missing reviewer on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_risk\",\n command: 'pm update <id> --risk \"<level>\"',\n summary: \"Backfill the missing risk on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_confidence\",\n command: 'pm update <id> --confidence \"<level>\"',\n summary: \"Backfill the missing confidence on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_sprint\",\n command: 'pm update <id> --sprint \"<sprint>\"',\n summary: \"Backfill the missing sprint on the reported item(s).\",\n },\n {\n code: \"validate_metadata_missing_release\",\n command: 'pm update <id> --release \"<release>\"',\n summary: \"Backfill the missing release on the reported item(s).\",\n },\n {\n code: \"validate_metadata_custom_profile_missing_required_fields\",\n command: 'pm config set metadata-required-fields --criterion \"<field>\"',\n summary:\n \"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items.\",\n },\n // --- pm validate: resolution ---\n {\n code: \"validate_resolution_missing_fields\",\n command: 'pm update <id> --resolution \"<how resolved>\"',\n summary: \"Backfill resolution / expected_result / actual_result on the reported closed item(s).\",\n },\n // --- pm validate: lifecycle ---\n {\n code: \"validate_lifecycle_active_closure_like_metadata\",\n command: \"pm update <id> --unset <closure-like-field>\",\n summary:\n \"Clear the closure-like field the validator flags on this active item — the detail row names it (resolution / actual-result / blocked-reason) — or close the item if it is actually done.\",\n },\n {\n code: \"validate_lifecycle_active_terminal_parent\",\n command: \"pm update <id> --parent <active-parent-id>\",\n summary: \"Reopen the terminal parent or move the active child under a non-terminal parent.\",\n },\n {\n code: \"validate_lifecycle_stale_blockers\",\n command: \"pm update <id> --unset blocked-by --unset blocked-reason\",\n summary:\n \"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles_error\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n {\n code: \"validate_lifecycle_dependency_cycles\",\n command: \"pm update <id> --dep-remove <dep-id>\",\n summary: \"Break the dependency cycle by removing one edge from the reported cycle.\",\n },\n // --- pm validate: files ---\n {\n code: \"validate_files_missing_linked_paths\",\n command: \"pm <files|docs> <id> --remove <path>\",\n summary:\n \"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc).\",\n },\n {\n code: \"validate_files_orphaned_paths\",\n command: \"pm <files|docs> <id> --add <path>\",\n summary:\n \"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace.\",\n },\n {\n code: \"validate_files_tracked_all_strict_forces_pm_internals\",\n command: \"pm validate --check-files --include-pm-internals\",\n summary: \"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode.\",\n },\n // --- pm validate: history_drift ---\n {\n code: \"validate_history_drift_missing_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items missing a history stream.\",\n },\n {\n code: \"validate_history_drift_unreadable_streams\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with an unreadable history stream.\",\n },\n {\n code: \"validate_history_drift_hash_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items whose content hash drifted.\",\n },\n {\n code: \"validate_history_drift_chain_mismatches\",\n command: \"pm history-repair <id>\",\n summary: \"Re-anchor the history chains of the items with a broken history chain.\",\n },\n // --- pm validate: command_references ---\n {\n code: \"validate_command_references_stale_pm_ids\",\n command: 'pm update <id> --replace-tests --test \"command=<corrected-command>\" [--test ...]',\n summary:\n \"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call.\",\n },\n]);\n\n/**\n * Resolve the remediation entry for a warning token, or `undefined` when no\n * entry is registered. A warning matches an entry when it equals the entry code\n * or begins with `<code>:` (the colon boundary keeps sibling codes such as\n * `validate_lifecycle_dependency_cycles` and\n * `validate_lifecycle_dependency_cycles_error` disjoint).\n *\n * First match is intentional and correct: registry codes are mutually exclusive\n * under the colon-boundary rule, so at most one entry can ever match a warning\n * and order is irrelevant. That invariant is enforced by a test (see\n * remediation-registry.spec.ts \"keeps every registry code mutually exclusive\"),\n * which is why this stays a simple linear scan rather than a longest-prefix\n * search — a longest-prefix tie-break is unreachable with disjoint codes.\n *\n * Accepts unknown input defensively (this is an exported helper SDK consumers\n * may call from untyped JS): a non-string `warning` resolves to `undefined`.\n */\nexport function resolveRemediation(warning: string): RemediationEntry | undefined {\n if (typeof warning !== \"string\") {\n return undefined;\n }\n const normalized = warning.trim();\n for (const entry of REMEDIATION_REGISTRY) {\n if (normalized === entry.code || normalized.startsWith(`${entry.code}:`)) {\n return entry;\n }\n }\n return undefined;\n}\n\n/**\n * Build a compact `remediation_map` (code -> command) for a set of warning\n * tokens. First match wins per code; unknown codes are skipped. Used by\n * `pm health --json` per-check details and as the source of deduped executable\n * commands for `pm validate --fix-hints`.\n */\nexport function buildRemediationMap(warnings: Iterable<string>): Record<string, string> {\n const map: Record<string, string> = {};\n for (const warning of warnings) {\n const entry = resolveRemediation(warning);\n if (entry !== undefined && !Object.prototype.hasOwnProperty.call(map, entry.code)) {\n map[entry.code] = entry.command;\n }\n }\n return map;\n}\n\n/**\n * Build a deduped, ordered list of executable remediation commands for a set of\n * warning tokens (one command per distinct matched code). Used by\n * `pm validate --fix-hints` for checks that do not already emit per-row\n * remediation commands.\n */\nexport function buildRemediationCommands(warnings: Iterable<string>): string[] {\n return Object.values(buildRemediationMap(warnings));\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAkBH;;;;;GAKG;;;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAgC,MAAM,CAAC,MAAM,CAAC;IAC7E,iCAAiC;IACjC;QACE,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,yFAAyF;KACnG;IACD,2CAA2C;IAC3C;QACE,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,uHAAuH;KAC1H;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EACL,yHAAyH;KAC5H;IACD;QACE,IAAI,EAAE,4BAA4B;QAClC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EAAE,6GAA6G;KACvH;IACD,qCAAqC;IACrC;QACE,IAAI,EAAE,0BAA0B;QAChC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EAAE,yGAAyG;KACnH;IACD;QACE,IAAI,EAAE,iCAAiC;QACvC,OAAO,EAAE,uBAAuB;QAChC,OAAO,EAAE,0FAA0F;KACpG;IACD,0CAA0C;IAC1C;QACE,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,6BAA6B;QACtC,OAAO,EAAE,0FAA0F;KACpG;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,6BAA6B;QACtC,OAAO,EAAE,8FAA8F;KACxG;IACD;QACE,IAAI,EAAE,yBAA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IAChD,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAClC,KAAK,MAAM,KAAK,IAAI,oBAAoB,EAAE,CAAC;QACzC,IAAI,UAAU,KAAK,KAAK,CAAC,IAAI,IAAI,UAAU,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YACzE,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAA0B;IAC5D,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAClF,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;QAClC,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAA0B;IACjE,OAAO,MAAM,CAAC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;AACtD,CAAC","debugId":"88ac4364-7d22-5199-8b9b-c6f40eb50d8b"}
|
|
@@ -82,6 +82,7 @@ export interface EffectiveExtension {
|
|
|
82
82
|
directory: string;
|
|
83
83
|
manifest_path: string;
|
|
84
84
|
name: string;
|
|
85
|
+
source_package?: string;
|
|
85
86
|
version: string;
|
|
86
87
|
entry: string;
|
|
87
88
|
priority: number;
|
|
@@ -376,6 +377,36 @@ export interface SearchProviderHit {
|
|
|
376
377
|
export type SearchProviderQueryResult = SearchProviderHit[] | {
|
|
377
378
|
hits?: SearchProviderHit[];
|
|
378
379
|
};
|
|
380
|
+
export interface SearchProviderQueryExpansionContext {
|
|
381
|
+
query: string;
|
|
382
|
+
mode: Exclude<ExtensionSearchMode, "keyword">;
|
|
383
|
+
settings: PmSettings;
|
|
384
|
+
[key: string]: unknown;
|
|
385
|
+
}
|
|
386
|
+
export type SearchProviderQueryExpansionResult = string[] | {
|
|
387
|
+
queries?: string[];
|
|
388
|
+
};
|
|
389
|
+
export interface SearchProviderRerankCandidate {
|
|
390
|
+
id: string;
|
|
391
|
+
text: string;
|
|
392
|
+
score: number;
|
|
393
|
+
}
|
|
394
|
+
export interface SearchProviderRerankHit {
|
|
395
|
+
id: string;
|
|
396
|
+
score: number;
|
|
397
|
+
}
|
|
398
|
+
export type SearchProviderRerankResult = SearchProviderRerankHit[] | {
|
|
399
|
+
hits?: SearchProviderRerankHit[];
|
|
400
|
+
};
|
|
401
|
+
export interface SearchProviderRerankContext {
|
|
402
|
+
query: string;
|
|
403
|
+
mode: "hybrid";
|
|
404
|
+
model: string;
|
|
405
|
+
top_k: number;
|
|
406
|
+
settings: PmSettings;
|
|
407
|
+
candidates: SearchProviderRerankCandidate[];
|
|
408
|
+
[key: string]: unknown;
|
|
409
|
+
}
|
|
379
410
|
export interface SearchProviderEmbedBatchContext {
|
|
380
411
|
inputs: string[];
|
|
381
412
|
settings: PmSettings;
|
|
@@ -391,6 +422,9 @@ export interface SearchProviderEmbedContext {
|
|
|
391
422
|
export interface SearchProviderDefinition {
|
|
392
423
|
name: string;
|
|
393
424
|
query?: (context: SearchProviderQueryContext) => SearchProviderQueryResult | Promise<SearchProviderQueryResult>;
|
|
425
|
+
queryExpansion?: (context: SearchProviderQueryExpansionContext) => SearchProviderQueryExpansionResult | Promise<SearchProviderQueryExpansionResult>;
|
|
426
|
+
query_expansion?: (context: SearchProviderQueryExpansionContext) => SearchProviderQueryExpansionResult | Promise<SearchProviderQueryExpansionResult>;
|
|
427
|
+
rerank?: (context: SearchProviderRerankContext) => SearchProviderRerankResult | Promise<SearchProviderRerankResult>;
|
|
394
428
|
embedBatch?: (context: SearchProviderEmbedBatchContext) => number[][] | Promise<number[][]>;
|
|
395
429
|
embed_batch?: (context: SearchProviderEmbedBatchContext) => number[][] | Promise<number[][]>;
|
|
396
430
|
embed?: (context: SearchProviderEmbedContext) => number[] | Promise<number[]>;
|
|
@@ -491,6 +525,7 @@ export interface RegisteredExtensionFlagDefinitions {
|
|
|
491
525
|
export interface RegisteredExtensionCommandDefinition {
|
|
492
526
|
layer: ExtensionLayer;
|
|
493
527
|
name: string;
|
|
528
|
+
source_package?: string;
|
|
494
529
|
command: string;
|
|
495
530
|
action: string;
|
|
496
531
|
description?: string;
|
|
@@ -631,6 +666,7 @@ export interface ExtensionCandidate {
|
|
|
631
666
|
manifest_path: string;
|
|
632
667
|
entry_path: string;
|
|
633
668
|
manifest: ExtensionManifest;
|
|
669
|
+
source_package?: string;
|
|
634
670
|
}
|
|
635
671
|
export interface ExtensionLayerScanResult {
|
|
636
672
|
diagnostics: ExtensionDiagnostic[];
|
|
@@ -1,5 +1,5 @@
|
|
|
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]="93175dd3-3dce-5323-91cf-446f2ea6e7d8")}catch(e){}}();
|
|
3
3
|
export const KNOWN_EXTENSION_CAPABILITIES = [
|
|
4
4
|
"commands",
|
|
5
5
|
"renderers",
|
|
@@ -78,4 +78,4 @@ export function createDefaultExtensionGovernancePolicy() {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
//# sourceMappingURL=extension-types.js.map
|
|
81
|
-
//# debugId=
|
|
81
|
+
//# debugId=93175dd3-3dce-5323-91cf-446f2ea6e7d8
|