@unbrained/pm-cli 2026.6.9 → 2026.6.11
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/CHANGELOG.md +59 -0
- package/README.md +1 -1
- package/dist/cli/bootstrap-args.d.ts +11 -0
- package/dist/cli/bootstrap-args.js +90 -4
- package/dist/cli/bootstrap-args.js.map +1 -1
- package/dist/cli/commands/aggregate.d.ts +7 -0
- package/dist/cli/commands/aggregate.js +53 -12
- package/dist/cli/commands/aggregate.js.map +1 -1
- package/dist/cli/commands/close.d.ts +1 -0
- package/dist/cli/commands/close.js +106 -3
- package/dist/cli/commands/close.js.map +1 -1
- package/dist/cli/commands/completion.js +20 -7
- package/dist/cli/commands/completion.js.map +1 -1
- package/dist/cli/commands/context.d.ts +9 -0
- package/dist/cli/commands/context.js +149 -20
- package/dist/cli/commands/context.js.map +1 -1
- package/dist/cli/commands/contracts.d.ts +2 -0
- package/dist/cli/commands/contracts.js +9 -2
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/create.d.ts +1 -0
- package/dist/cli/commands/create.js +5 -3
- package/dist/cli/commands/create.js.map +1 -1
- package/dist/cli/commands/extension.js +4 -2
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/health.js +44 -6
- package/dist/cli/commands/health.js.map +1 -1
- package/dist/cli/commands/history.js +6 -5
- package/dist/cli/commands/history.js.map +1 -1
- package/dist/cli/commands/linked-test-parsers.d.ts +1 -0
- package/dist/cli/commands/linked-test-parsers.js +289 -2
- package/dist/cli/commands/linked-test-parsers.js.map +1 -1
- package/dist/cli/commands/reindex.d.ts +1 -0
- package/dist/cli/commands/reindex.js +33 -4
- package/dist/cli/commands/reindex.js.map +1 -1
- package/dist/cli/commands/test.d.ts +6 -0
- package/dist/cli/commands/test.js +46 -5
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/error-guidance.d.ts +8 -0
- package/dist/cli/error-guidance.js +102 -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 +42 -2
- package/dist/cli/extension-command-help.js.map +1 -1
- package/dist/cli/extension-command-options.d.ts +2 -0
- package/dist/cli/extension-command-options.js +51 -2
- package/dist/cli/extension-command-options.js.map +1 -1
- package/dist/cli/main.js +26 -26
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/register-list-query.js +3 -2
- package/dist/cli/register-list-query.js.map +1 -1
- package/dist/cli/register-mutation.js +4 -2
- package/dist/cli/register-mutation.js.map +1 -1
- package/dist/cli/register-operations.js +15 -6
- package/dist/cli/register-operations.js.map +1 -1
- package/dist/cli/registration-helpers.js +9 -2
- package/dist/cli/registration-helpers.js.map +1 -1
- package/dist/cli-bundle/chunks/{activity-RUJATACW.js → activity-XADJOG6G.js} +11 -11
- package/dist/cli-bundle/chunks/activity-XZIUPGZH.js +16 -0
- package/dist/cli-bundle/chunks/{aggregate-TT7OCHHT.js → aggregate-6OTS3AOO.js} +65 -24
- package/dist/cli-bundle/chunks/aggregate-6OTS3AOO.js.map +1 -0
- package/dist/cli-bundle/chunks/{aggregate-IQ27NFBI.js → aggregate-OD36DJU5.js} +64 -23
- package/dist/cli-bundle/chunks/aggregate-OD36DJU5.js.map +7 -0
- package/dist/cli-bundle/chunks/{append-E7AJ5RTR.js → append-JYWO4P7W.js} +8 -8
- package/dist/cli-bundle/chunks/{append-CWQZBUWV.js → append-KG55G7S3.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-LF2VNLEZ.js → chunk-3KLPFWZ4.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-LF2VNLEZ.js.map → chunk-3KLPFWZ4.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ENCVPOID.js → chunk-3SLOMKCJ.js} +12 -12
- package/dist/cli-bundle/chunks/chunk-4HFU4UO2.js +518 -0
- package/dist/cli-bundle/chunks/chunk-4HFU4UO2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-F2REA7VW.js → chunk-4JCSYR6F.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-CAXUGAAF.js → chunk-4YFAGDRH.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-U3Z4OCZC.js → chunk-5SCT2JCT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NHRZSYAA.js → chunk-73ZPG2I3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-D5D7VKIC.js → chunk-7IYFN5R7.js} +6 -5
- package/dist/cli-bundle/chunks/chunk-7IYFN5R7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-A5342JVL.js → chunk-7RIT3OCD.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-LU54Z4QI.js → chunk-7UGSRQCL.js} +76 -74
- package/dist/cli-bundle/chunks/{chunk-LU54Z4QI.js.map → chunk-7UGSRQCL.js.map} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5JF76OJF.js → chunk-A6LXQFO7.js} +290 -25
- package/dist/cli-bundle/chunks/chunk-A6LXQFO7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-7CR4GAYN.js → chunk-ATEES5SX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FHUI7AXS.js → chunk-AVGHVVF7.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-T7B5VAKD.js → chunk-B65UUCGQ.js} +13 -6
- package/dist/cli-bundle/chunks/chunk-B65UUCGQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-42IULX44.js → chunk-CCX4RSYZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EFRHTZO4.js → chunk-CW6E4NAT.js} +8 -8
- package/dist/cli-bundle/chunks/{chunk-JN3BT7UY.js → chunk-DY6C42S6.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-PUSOAQCR.js → chunk-E5DUIJA4.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-E7LOIIFP.js → chunk-ESANVZF4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-WQZCEEQN.js → chunk-EWFY7SLA.js} +157 -12
- package/dist/cli-bundle/chunks/chunk-EWFY7SLA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-YI6W2DBN.js → chunk-F75JSIOZ.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-6IGTNFE3.js → chunk-FDH2X65L.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GPOSGWCN.js → chunk-FXRU333M.js} +68 -7
- package/dist/cli-bundle/chunks/chunk-FXRU333M.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-C72IQIBT.js → chunk-FY4SPXSC.js} +302 -30
- package/dist/cli-bundle/chunks/chunk-FY4SPXSC.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-TLD3UYGY.js → chunk-GKIZW7SM.js} +5 -4
- package/dist/cli-bundle/chunks/chunk-GKIZW7SM.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-YSANBZAE.js → chunk-GWZSYR6X.js} +12 -5
- package/dist/cli-bundle/chunks/chunk-GWZSYR6X.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-FJNJEWU4.js → chunk-HGLC63AU.js} +14 -12
- package/dist/cli-bundle/chunks/chunk-HGLC63AU.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-RLVI7KDW.js → chunk-HHHJ2GI3.js} +163 -11
- package/dist/cli-bundle/chunks/chunk-HHHJ2GI3.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-AVGOVJGV.js → chunk-HI7STVF2.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-AVGOVJGV.js.map → chunk-HI7STVF2.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-ANKG2JKL.js → chunk-I2IJY2NL.js} +12 -5
- package/dist/cli-bundle/chunks/chunk-I2IJY2NL.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-ZPXDD6RQ.js → chunk-I53JBTJW.js} +6 -6
- package/dist/cli-bundle/chunks/{chunk-23WNCJBA.js → chunk-I7NYDZDV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-EQ6N6IDR.js → chunk-IGVJRZ6H.js} +13 -11
- package/dist/cli-bundle/chunks/chunk-IGVJRZ6H.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-JVMAOD54.js → chunk-IH4MBKK7.js} +14 -7
- package/dist/cli-bundle/chunks/chunk-IH4MBKK7.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-BIRVSIM2.js → chunk-IKOH24GZ.js} +14 -14
- package/dist/cli-bundle/chunks/chunk-IKOH24GZ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-SAUXUI6U.js → chunk-IUKD4W6Z.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3RHE76G6.js → chunk-J3GD64J2.js} +15 -15
- package/dist/cli-bundle/chunks/chunk-J3GD64J2.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-OT6XAMO5.js → chunk-KWAXVAXX.js} +7 -5
- package/dist/cli-bundle/chunks/{chunk-OT6XAMO5.js.map → chunk-KWAXVAXX.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SD6H3RLA.js → chunk-LCSCXBGT.js} +15 -5
- package/dist/cli-bundle/chunks/{chunk-SD6H3RLA.js.map → chunk-LCSCXBGT.js.map} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RKCJ2JMA.js → chunk-OASDW5UI.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-JEGFLKSI.js → chunk-OLKBSY4N.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4LRVXVJK.js → chunk-P2PSODAQ.js} +70 -9
- package/dist/cli-bundle/chunks/chunk-P2PSODAQ.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-XEOO6K5J.js → chunk-P5BJOMBB.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-P2NVFE4L.js → chunk-P5U5EOMA.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-AM2AXVFS.js → chunk-PSD7F7DX.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-VDVVOLR6.js → chunk-QJMGRZO2.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-7YTWXGE3.js → chunk-QKW5D45B.js} +112 -7
- package/dist/cli-bundle/chunks/chunk-QKW5D45B.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-T7NWFVOA.js → chunk-QNJSITCX.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-MNXJ6YDO.js → chunk-RXAP6JL5.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-5MMLINZB.js → chunk-S26FESD4.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-I26E6XA7.js → chunk-S2ZLDYGS.js} +8 -6
- package/dist/cli-bundle/chunks/chunk-S2ZLDYGS.js.map +1 -0
- package/dist/cli-bundle/chunks/chunk-SXKNJPQ7.js +528 -0
- package/dist/cli-bundle/chunks/chunk-SXKNJPQ7.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-OPYA2HIU.js → chunk-TK5VZFHY.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-4TJWRPIH.js → chunk-TNAP7EJX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-I4FGL3K2.js → chunk-UOO6BYIA.js} +16 -6
- package/dist/cli-bundle/chunks/chunk-UOO6BYIA.js.map +1 -0
- package/dist/cli-bundle/chunks/{chunk-5ATRWEZO.js → chunk-UUWGCWBU.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-YX5LAKFJ.js → chunk-VAOUX6TK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RMTI5R76.js → chunk-VFUZV5EB.js} +111 -6
- package/dist/cli-bundle/chunks/chunk-VFUZV5EB.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-WCWIDJII.js → chunk-VPEAS7PS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RE2JQJZJ.js → chunk-VSRZRLG3.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-PW7C262O.js → chunk-WUNFKP7M.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BACSNVWE.js → chunk-XJDGS74Y.js} +71 -69
- package/dist/cli-bundle/chunks/{chunk-BACSNVWE.js.map → chunk-XJDGS74Y.js.map} +1 -1
- package/dist/cli-bundle/chunks/{chunk-H37YPWLM.js → chunk-XMBI6TNW.js} +13 -7
- package/dist/cli-bundle/chunks/chunk-XMBI6TNW.js.map +7 -0
- package/dist/cli-bundle/chunks/{chunk-NUGAWYEN.js → chunk-XTKJSVWH.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KDX6VC3P.js → chunk-XUC4C4PT.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-44JP4PYY.js → chunk-Y3YKK7CY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KTVXLI54.js → chunk-YW6Q3RYZ.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-I3UILOUU.js → chunk-ZLMIWZUG.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FKH7K6YP.js → chunk-ZMW77VWV.js} +9 -9
- package/dist/cli-bundle/chunks/{chunk-NJRZIJ4N.js → chunk-ZYNJNPYD.js} +14 -8
- package/dist/cli-bundle/chunks/chunk-ZYNJNPYD.js.map +1 -0
- package/dist/cli-bundle/chunks/{claim-UXFGCF3P.js → claim-2RDYMCTP.js} +10 -10
- package/dist/cli-bundle/chunks/{claim-RV6WYUF7.js → claim-MJ7DZFC3.js} +10 -10
- package/dist/cli-bundle/chunks/close-4FMAPEMY.js +13 -0
- package/dist/cli-bundle/chunks/{close-O4JK2JKD.js → close-XLEKIQSW.js} +8 -8
- package/dist/cli-bundle/chunks/{close-many-EQO4TPIE.js → close-many-AOD4HSAZ.js} +15 -15
- package/dist/cli-bundle/chunks/{close-many-SRDBV3SI.js → close-many-XKAQY5CQ.js} +15 -15
- package/dist/cli-bundle/chunks/{comments-TTZUIB2O.js → comments-B4RWWDJT.js} +10 -10
- package/dist/cli-bundle/chunks/{comments-OMB7YE27.js → comments-RN5TG4ZN.js} +10 -10
- package/dist/cli-bundle/chunks/{config-5VPR42A6.js → config-3JXJ3XZ7.js} +8 -8
- package/dist/cli-bundle/chunks/{config-NNLXVGVC.js → config-FZ4UDC4B.js} +8 -8
- package/dist/cli-bundle/chunks/{context-4QK6GRXO.js → context-L36PIN35.js} +146 -33
- package/dist/cli-bundle/chunks/{context-4QK6GRXO.js.map → context-L36PIN35.js.map} +2 -2
- package/dist/cli-bundle/chunks/{context-4N7GYTVQ.js → context-QBPO3BFM.js} +147 -34
- package/dist/cli-bundle/chunks/context-QBPO3BFM.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-DXCWXOSP.js → contracts-3NKWYKKU.js} +309 -6
- package/dist/cli-bundle/chunks/contracts-3NKWYKKU.js.map +1 -0
- package/dist/cli-bundle/chunks/{contracts-AOBNEBVT.js → contracts-MIXBWJIB.js} +315 -5
- package/dist/cli-bundle/chunks/contracts-MIXBWJIB.js.map +7 -0
- package/dist/cli-bundle/chunks/{copy-5NM3SVJA.js → copy-ALU5WMHA.js} +7 -7
- package/dist/cli-bundle/chunks/{copy-XSYEQTLA.js → copy-FWIVTLBO.js} +7 -7
- package/dist/cli-bundle/chunks/{create-FCCAATQV.js → create-IFA26O2I.js} +13 -13
- package/dist/cli-bundle/chunks/create-JVXYHYH4.js +27 -0
- package/dist/cli-bundle/chunks/{delete-5JFP6OG7.js → delete-IYTIYAJS.js} +7 -7
- package/dist/cli-bundle/chunks/{delete-PQXJQXQ7.js → delete-Y2SGJBGY.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-S5322EOQ.js → deps-6TSPOSGU.js} +7 -7
- package/dist/cli-bundle/chunks/{deps-XXKBOQUA.js → deps-CZ4PTVXU.js} +7 -7
- package/dist/cli-bundle/chunks/{docs-C7CCVWAJ.js → docs-5WMBVQT2.js} +9 -9
- package/dist/cli-bundle/chunks/{docs-DZRPAW5S.js → docs-MB53UJAJ.js} +9 -9
- package/dist/cli-bundle/chunks/{extension-CSHP6FZX.js → extension-Q34OEWO5.js} +5 -5
- package/dist/cli-bundle/chunks/{extension-XNNVUVAY.js → extension-WH2FOIOZ.js} +5 -5
- package/dist/cli-bundle/chunks/{files-UPCNKEIZ.js → files-DLB5LJEP.js} +9 -9
- package/dist/cli-bundle/chunks/{files-OBWYYPKM.js → files-GVMNVLCB.js} +9 -9
- package/dist/cli-bundle/chunks/{gc-FA2ONELT.js → gc-2WEPW6D6.js} +3 -3
- package/dist/cli-bundle/chunks/{gc-KXK6KBRN.js → gc-4Z3IKHAZ.js} +3 -3
- package/dist/cli-bundle/chunks/{get-PNTSONGB.js → get-PCHS7RA6.js} +11 -11
- package/dist/cli-bundle/chunks/{get-FLHYTOBA.js → get-QARTE6BL.js} +11 -11
- package/dist/cli-bundle/chunks/{health-CS5RNTJX.js → health-4ZYB3IYQ.js} +47 -19
- package/dist/cli-bundle/chunks/health-4ZYB3IYQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{health-KCRVYIYY.js → health-YO5LRWN4.js} +46 -18
- package/dist/cli-bundle/chunks/health-YO5LRWN4.js.map +7 -0
- package/dist/cli-bundle/chunks/{history-COQTPBEU.js → history-7WUAEWHW.js} +10 -10
- package/dist/cli-bundle/chunks/history-L2FQFRTU.js +20 -0
- package/dist/cli-bundle/chunks/{history-compact-PVS2A3FS.js → history-compact-3EJ3L2O7.js} +11 -11
- package/dist/cli-bundle/chunks/{history-compact-66PSRYL3.js → history-compact-LW27IPFK.js} +11 -11
- package/dist/cli-bundle/chunks/{history-redact-DCXAWGTF.js → history-redact-G72A4EJ4.js} +11 -11
- package/dist/cli-bundle/chunks/history-redact-QWQCX5DZ.js +19 -0
- package/dist/cli-bundle/chunks/{history-repair-SEQDFTGW.js → history-repair-KVPFJKOS.js} +11 -11
- package/dist/cli-bundle/chunks/{history-repair-TA3NRIFO.js → history-repair-RUGKD3YR.js} +11 -11
- package/dist/cli-bundle/chunks/init-4BKRHGWW.js +17 -0
- package/dist/cli-bundle/chunks/{init-IQJE3EKJ.js → init-S5WEGUJY.js} +9 -9
- package/dist/cli-bundle/chunks/{learnings-XC6EMW5E.js → learnings-HQXSSKZ5.js} +10 -10
- package/dist/cli-bundle/chunks/{learnings-RJPGH2ME.js → learnings-XK3P4ZDR.js} +10 -10
- package/dist/cli-bundle/chunks/{list-NJV6WBT4.js → list-6CL3XFT6.js} +10 -10
- package/dist/cli-bundle/chunks/list-BYNN4ZEO.js +19 -0
- package/dist/cli-bundle/chunks/{notes-2KWHADK3.js → notes-5T6P7C5V.js} +10 -10
- package/dist/cli-bundle/chunks/{notes-FNCDMZW2.js → notes-U5FZCSBT.js} +10 -10
- package/dist/cli-bundle/chunks/{plan-CYK2P5PD.js → plan-FQLMJRLZ.js} +13 -13
- package/dist/cli-bundle/chunks/{plan-MQO5JTSV.js → plan-VNUG3WZZ.js} +13 -13
- package/dist/cli-bundle/chunks/{register-list-query-6RA24SIZ.js → register-list-query-NPE3ECJQ.js} +21 -21
- package/dist/cli-bundle/chunks/register-list-query-NPE3ECJQ.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-list-query-IO3RR5K6.js → register-list-query-VHDXWEPP.js} +20 -20
- package/dist/cli-bundle/chunks/register-list-query-VHDXWEPP.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-mutation-VV2SC2KL.js → register-mutation-DG53FCBV.js} +36 -35
- package/dist/cli-bundle/chunks/register-mutation-DG53FCBV.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-mutation-KVFUXCAZ.js → register-mutation-EAYNLGOS.js} +35 -34
- package/dist/cli-bundle/chunks/register-mutation-EAYNLGOS.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-operations-DFNVRSJ5.js → register-operations-AM6KTWB6.js} +42 -37
- package/dist/cli-bundle/chunks/register-operations-AM6KTWB6.js.map +1 -0
- package/dist/cli-bundle/chunks/{register-operations-TAUUTRJ4.js → register-operations-FWFE64JG.js} +41 -36
- package/dist/cli-bundle/chunks/register-operations-FWFE64JG.js.map +7 -0
- package/dist/cli-bundle/chunks/{register-setup-X2R5CFDV.js → register-setup-G4QYI3RX.js} +15 -15
- package/dist/cli-bundle/chunks/{register-setup-GAQZZRUA.js → register-setup-IKX5524L.js} +15 -15
- package/dist/cli-bundle/chunks/restore-CHIOQAQL.js +17 -0
- package/dist/cli-bundle/chunks/{restore-E3GZKRRK.js → restore-M6AFHMV4.js} +11 -11
- package/dist/cli-bundle/chunks/{schema-3CPFLDAY.js → schema-76HDZJCC.js} +8 -8
- package/dist/cli-bundle/chunks/{schema-7EHBPNXM.js → schema-AINZ2IMM.js} +8 -8
- package/dist/cli-bundle/chunks/{search-OBZVYJJ2.js → search-JMLFQEPJ.js} +10 -10
- package/dist/cli-bundle/chunks/{search-2T3NCCUR.js → search-NL3TSCYB.js} +10 -10
- package/dist/cli-bundle/chunks/{stats-6LVK4JER.js → stats-BKXCBIGT.js} +7 -7
- package/dist/cli-bundle/chunks/{stats-ULGQACF7.js → stats-UBD56TGK.js} +7 -7
- package/dist/cli-bundle/chunks/{telemetry-HHKRTMZA.js → telemetry-N454RHG5.js} +4 -4
- package/dist/cli-bundle/chunks/{telemetry-6G27FLCP.js → telemetry-ZJXK3H7X.js} +4 -4
- package/dist/cli-bundle/chunks/{test-2PP4YBV6.js → test-BQAKIXAT.js} +14 -14
- package/dist/cli-bundle/chunks/test-O74JFUH5.js +32 -0
- package/dist/cli-bundle/chunks/{test-all-6Z272JRI.js → test-all-7LV3I6S5.js} +14 -14
- package/dist/cli-bundle/chunks/{test-all-NETGVNM6.js → test-all-TDYCCBA4.js} +14 -14
- package/dist/cli-bundle/chunks/{test-runs-M24WA6TI.js → test-runs-E64M6XS3.js} +5 -5
- package/dist/cli-bundle/chunks/{test-runs-CRPQVMMG.js → test-runs-LXZLULCI.js} +5 -5
- package/dist/cli-bundle/chunks/update-2EVXOC7V.js +21 -0
- package/dist/cli-bundle/chunks/update-5A2B6QYB.js +25 -0
- package/dist/cli-bundle/chunks/{update-many-JSRF5EH5.js → update-many-TUGU5YXQ.js} +22 -22
- package/dist/cli-bundle/chunks/{update-many-Y3HOL7WA.js → update-many-V4LA3C4H.js} +22 -22
- package/dist/cli-bundle/chunks/{upgrade-5RTQVKKE.js → upgrade-37F7JKES.js} +5 -5
- package/dist/cli-bundle/chunks/{upgrade-ECB6GH3M.js → upgrade-L32JA4TZ.js} +5 -5
- package/dist/cli-bundle/chunks/{validate-MCNMAXVA.js → validate-EQTT6WVX.js} +16 -16
- package/dist/cli-bundle/chunks/{validate-J6Q444SD.js → validate-XN4I4DPL.js} +16 -16
- package/dist/cli-bundle/main.js +276 -47
- package/dist/cli-bundle/main.js.map +2 -2
- package/dist/core/diagnostics/remediation.js +12 -2
- package/dist/core/diagnostics/remediation.js.map +1 -1
- package/dist/core/extensions/extension-policy.d.ts +14 -1
- package/dist/core/extensions/extension-policy.js +38 -3
- package/dist/core/extensions/extension-policy.js.map +1 -1
- package/dist/core/extensions/extension-types.d.ts +40 -1
- package/dist/core/extensions/extension-types.js +28 -2
- package/dist/core/extensions/extension-types.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +6 -4
- package/dist/core/extensions/loader.js +67 -14
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/history/replay.d.ts +1 -1
- package/dist/core/history/replay.js +13 -4
- package/dist/core/history/replay.js.map +1 -1
- package/dist/core/output/mutation-projection.d.ts +2 -0
- package/dist/core/output/mutation-projection.js +9 -2
- package/dist/core/output/mutation-projection.js.map +1 -1
- package/dist/core/output/output.d.ts +2 -0
- package/dist/core/output/output.js +7 -3
- package/dist/core/output/output.js.map +1 -1
- package/dist/core/output/query-summary.d.ts +31 -0
- package/dist/core/output/query-summary.js +62 -0
- package/dist/core/output/query-summary.js.map +1 -0
- package/dist/core/shared/command-types.d.ts +1 -0
- package/dist/core/shared/command-types.js +2 -2
- package/dist/core/shared/command-types.js.map +1 -1
- package/dist/core/shared/constants.js +8 -4
- package/dist/core/shared/constants.js.map +1 -1
- package/dist/core/store/item-store.d.ts +1 -1
- package/dist/core/store/item-store.js +3 -3
- package/dist/core/store/item-store.js.map +1 -1
- package/dist/core/store/settings-read-cache.d.ts +15 -0
- package/dist/core/store/settings-read-cache.js +72 -0
- package/dist/core/store/settings-read-cache.js.map +1 -0
- package/dist/core/store/settings-validator.d.ts +4 -1
- 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 +166 -16
- package/dist/core/store/settings.js.map +1 -1
- package/dist/core/telemetry/runtime.d.ts +1 -0
- package/dist/core/telemetry/runtime.js +3 -3
- package/dist/core/telemetry/runtime.js.map +1 -1
- package/dist/core/test/run-selectors.d.ts +27 -0
- package/dist/core/test/run-selectors.js +110 -0
- package/dist/core/test/run-selectors.js.map +1 -0
- package/dist/mcp/server.js +76 -262
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tool-definitions.d.ts +27 -0
- package/dist/mcp/tool-definitions.js +330 -0
- package/dist/mcp/tool-definitions.js.map +1 -0
- package/dist/sdk/cli-contracts/commander-mutation-options.js +3 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +3 -2
- package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +29 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
- package/dist/sdk/cli-contracts.js +37 -5
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +2 -2
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/runtime.d.ts +6 -0
- package/dist/sdk/runtime.js +51 -3
- package/dist/sdk/runtime.js.map +1 -1
- package/dist/types.d.ts +4 -1
- package/dist/types.js +4 -2
- package/dist/types.js.map +1 -1
- package/docs/AGENT_GUIDE.md +7 -1
- package/docs/ARCHITECTURE.md +7 -0
- package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
- package/docs/COMMANDS.md +38 -3
- package/docs/CONFIGURATION.md +1 -1
- package/docs/EXTENSIONS.md +55 -53
- package/docs/SDK.md +8 -2
- package/docs/TESTING.md +60 -0
- package/docs/schemas/extension-manifest.schema.json +120 -0
- package/marketplace.json +1 -1
- package/package.json +2 -2
- package/packages/pm-beads/extensions/beads/manifest.json +10 -0
- package/packages/pm-calendar/extensions/calendar/manifest.json +10 -0
- package/packages/pm-command-kit/README.md +72 -0
- package/packages/pm-command-kit/extensions/command-kit/index.js +181 -0
- package/packages/pm-command-kit/extensions/command-kit/index.ts +176 -0
- package/packages/pm-command-kit/extensions/command-kit/manifest.json +22 -0
- package/packages/pm-command-kit/package.json +53 -0
- package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +10 -0
- package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +10 -0
- package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +10 -0
- package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +10 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.js +6 -0
- package/packages/pm-search-advanced/extensions/search-advanced/index.ts +6 -0
- package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +10 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +1 -0
- package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +1 -0
- package/packages/pm-templates/extensions/templates/manifest.json +10 -0
- package/packages/pm-todos/extensions/todos/manifest.json +10 -0
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/README.md +7 -3
- package/plugins/pm-claude/commands/pm-init.md +1 -1
- package/plugins/pm-codex/README.md +2 -2
- package/dist/cli-bundle/chunks/activity-HF3VJYKH.js +0 -16
- package/dist/cli-bundle/chunks/aggregate-IQ27NFBI.js.map +0 -7
- package/dist/cli-bundle/chunks/aggregate-TT7OCHHT.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-3RHE76G6.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-4LRVXVJK.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-5JF76OJF.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-7YTWXGE3.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-ANKG2JKL.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-BIRVSIM2.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-C72IQIBT.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-D5D7VKIC.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-EQ6N6IDR.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-FJNJEWU4.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-GPOSGWCN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-H37YPWLM.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-I26E6XA7.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-I4FGL3K2.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-JVMAOD54.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-LU2HE272.js +0 -242
- package/dist/cli-bundle/chunks/chunk-LU2HE272.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-NJRZIJ4N.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-O4L7Z6LB.js +0 -252
- package/dist/cli-bundle/chunks/chunk-O4L7Z6LB.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RLVI7KDW.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-RMTI5R76.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-T7B5VAKD.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-TLD3UYGY.js.map +0 -7
- package/dist/cli-bundle/chunks/chunk-WQZCEEQN.js.map +0 -1
- package/dist/cli-bundle/chunks/chunk-YSANBZAE.js.map +0 -7
- package/dist/cli-bundle/chunks/close-JTTGW7TS.js +0 -13
- package/dist/cli-bundle/chunks/context-4N7GYTVQ.js.map +0 -1
- package/dist/cli-bundle/chunks/contracts-AOBNEBVT.js.map +0 -7
- package/dist/cli-bundle/chunks/contracts-DXCWXOSP.js.map +0 -1
- package/dist/cli-bundle/chunks/create-JAPLFDGJ.js +0 -27
- package/dist/cli-bundle/chunks/health-CS5RNTJX.js.map +0 -1
- package/dist/cli-bundle/chunks/health-KCRVYIYY.js.map +0 -7
- package/dist/cli-bundle/chunks/history-6624XISO.js +0 -20
- package/dist/cli-bundle/chunks/history-redact-ZRQTI7NB.js +0 -19
- package/dist/cli-bundle/chunks/init-ZVE2HMKK.js +0 -17
- package/dist/cli-bundle/chunks/list-OO5P472O.js +0 -19
- package/dist/cli-bundle/chunks/register-list-query-6RA24SIZ.js.map +0 -1
- package/dist/cli-bundle/chunks/register-list-query-IO3RR5K6.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-KVFUXCAZ.js.map +0 -7
- package/dist/cli-bundle/chunks/register-mutation-VV2SC2KL.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-DFNVRSJ5.js.map +0 -1
- package/dist/cli-bundle/chunks/register-operations-TAUUTRJ4.js.map +0 -7
- package/dist/cli-bundle/chunks/restore-F4ALFV4D.js +0 -17
- package/dist/cli-bundle/chunks/test-PPOLRIBA.js +0 -32
- package/dist/cli-bundle/chunks/update-MCPCPMHV.js +0 -25
- package/dist/cli-bundle/chunks/update-O7TBOUVQ.js +0 -21
- /package/dist/cli-bundle/chunks/{activity-RUJATACW.js.map → activity-XADJOG6G.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{activity-HF3VJYKH.js.map → activity-XZIUPGZH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-E7AJ5RTR.js.map → append-JYWO4P7W.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{append-CWQZBUWV.js.map → append-KG55G7S3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ENCVPOID.js.map → chunk-3SLOMKCJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-F2REA7VW.js.map → chunk-4JCSYR6F.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-CAXUGAAF.js.map → chunk-4YFAGDRH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-U3Z4OCZC.js.map → chunk-5SCT2JCT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NHRZSYAA.js.map → chunk-73ZPG2I3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-A5342JVL.js.map → chunk-7RIT3OCD.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-7CR4GAYN.js.map → chunk-ATEES5SX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FHUI7AXS.js.map → chunk-AVGHVVF7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-42IULX44.js.map → chunk-CCX4RSYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-EFRHTZO4.js.map → chunk-CW6E4NAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JN3BT7UY.js.map → chunk-DY6C42S6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PUSOAQCR.js.map → chunk-E5DUIJA4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-E7LOIIFP.js.map → chunk-ESANVZF4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YI6W2DBN.js.map → chunk-F75JSIOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-6IGTNFE3.js.map → chunk-FDH2X65L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-ZPXDD6RQ.js.map → chunk-I53JBTJW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-23WNCJBA.js.map → chunk-I7NYDZDV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-SAUXUI6U.js.map → chunk-IUKD4W6Z.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RKCJ2JMA.js.map → chunk-OASDW5UI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-JEGFLKSI.js.map → chunk-OLKBSY4N.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-XEOO6K5J.js.map → chunk-P5BJOMBB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-P2NVFE4L.js.map → chunk-P5U5EOMA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-AM2AXVFS.js.map → chunk-PSD7F7DX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-VDVVOLR6.js.map → chunk-QJMGRZO2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-T7NWFVOA.js.map → chunk-QNJSITCX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-MNXJ6YDO.js.map → chunk-RXAP6JL5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5MMLINZB.js.map → chunk-S26FESD4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-OPYA2HIU.js.map → chunk-TK5VZFHY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-4TJWRPIH.js.map → chunk-TNAP7EJX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-5ATRWEZO.js.map → chunk-UUWGCWBU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-YX5LAKFJ.js.map → chunk-VAOUX6TK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-WCWIDJII.js.map → chunk-VPEAS7PS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-RE2JQJZJ.js.map → chunk-VSRZRLG3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-PW7C262O.js.map → chunk-WUNFKP7M.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-NUGAWYEN.js.map → chunk-XTKJSVWH.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KDX6VC3P.js.map → chunk-XUC4C4PT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-44JP4PYY.js.map → chunk-Y3YKK7CY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-KTVXLI54.js.map → chunk-YW6Q3RYZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-I3UILOUU.js.map → chunk-ZLMIWZUG.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{chunk-FKH7K6YP.js.map → chunk-ZMW77VWV.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-UXFGCF3P.js.map → claim-2RDYMCTP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{claim-RV6WYUF7.js.map → claim-MJ7DZFC3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-JTTGW7TS.js.map → close-4FMAPEMY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-O4JK2JKD.js.map → close-XLEKIQSW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-EQO4TPIE.js.map → close-many-AOD4HSAZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{close-many-SRDBV3SI.js.map → close-many-XKAQY5CQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-TTZUIB2O.js.map → comments-B4RWWDJT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{comments-OMB7YE27.js.map → comments-RN5TG4ZN.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-5VPR42A6.js.map → config-3JXJ3XZ7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{config-NNLXVGVC.js.map → config-FZ4UDC4B.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-5NM3SVJA.js.map → copy-ALU5WMHA.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{copy-XSYEQTLA.js.map → copy-FWIVTLBO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-FCCAATQV.js.map → create-IFA26O2I.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{create-JAPLFDGJ.js.map → create-JVXYHYH4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-5JFP6OG7.js.map → delete-IYTIYAJS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{delete-PQXJQXQ7.js.map → delete-Y2SGJBGY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-S5322EOQ.js.map → deps-6TSPOSGU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{deps-XXKBOQUA.js.map → deps-CZ4PTVXU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-C7CCVWAJ.js.map → docs-5WMBVQT2.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{docs-DZRPAW5S.js.map → docs-MB53UJAJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-CSHP6FZX.js.map → extension-Q34OEWO5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{extension-XNNVUVAY.js.map → extension-WH2FOIOZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-UPCNKEIZ.js.map → files-DLB5LJEP.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{files-OBWYYPKM.js.map → files-GVMNVLCB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-FA2ONELT.js.map → gc-2WEPW6D6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{gc-KXK6KBRN.js.map → gc-4Z3IKHAZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-PNTSONGB.js.map → get-PCHS7RA6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{get-FLHYTOBA.js.map → get-QARTE6BL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-COQTPBEU.js.map → history-7WUAEWHW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-6624XISO.js.map → history-L2FQFRTU.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-PVS2A3FS.js.map → history-compact-3EJ3L2O7.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-compact-66PSRYL3.js.map → history-compact-LW27IPFK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-DCXAWGTF.js.map → history-redact-G72A4EJ4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-redact-ZRQTI7NB.js.map → history-redact-QWQCX5DZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-SEQDFTGW.js.map → history-repair-KVPFJKOS.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{history-repair-TA3NRIFO.js.map → history-repair-RUGKD3YR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-ZVE2HMKK.js.map → init-4BKRHGWW.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{init-IQJE3EKJ.js.map → init-S5WEGUJY.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-XC6EMW5E.js.map → learnings-HQXSSKZ5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{learnings-RJPGH2ME.js.map → learnings-XK3P4ZDR.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-NJV6WBT4.js.map → list-6CL3XFT6.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{list-OO5P472O.js.map → list-BYNN4ZEO.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-2KWHADK3.js.map → notes-5T6P7C5V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{notes-FNCDMZW2.js.map → notes-U5FZCSBT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-CYK2P5PD.js.map → plan-FQLMJRLZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{plan-MQO5JTSV.js.map → plan-VNUG3WZZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-X2R5CFDV.js.map → register-setup-G4QYI3RX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{register-setup-GAQZZRUA.js.map → register-setup-IKX5524L.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-F4ALFV4D.js.map → restore-CHIOQAQL.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{restore-E3GZKRRK.js.map → restore-M6AFHMV4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-3CPFLDAY.js.map → schema-76HDZJCC.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{schema-7EHBPNXM.js.map → schema-AINZ2IMM.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-OBZVYJJ2.js.map → search-JMLFQEPJ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{search-2T3NCCUR.js.map → search-NL3TSCYB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-6LVK4JER.js.map → stats-BKXCBIGT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{stats-ULGQACF7.js.map → stats-UBD56TGK.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-HHKRTMZA.js.map → telemetry-N454RHG5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{telemetry-6G27FLCP.js.map → telemetry-ZJXK3H7X.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-2PP4YBV6.js.map → test-BQAKIXAT.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-PPOLRIBA.js.map → test-O74JFUH5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-6Z272JRI.js.map → test-all-7LV3I6S5.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-all-NETGVNM6.js.map → test-all-TDYCCBA4.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-M24WA6TI.js.map → test-runs-E64M6XS3.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{test-runs-CRPQVMMG.js.map → test-runs-LXZLULCI.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-O7TBOUVQ.js.map → update-2EVXOC7V.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-MCPCPMHV.js.map → update-5A2B6QYB.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-JSRF5EH5.js.map → update-many-TUGU5YXQ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{update-many-Y3HOL7WA.js.map → update-many-V4LA3C4H.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-5RTQVKKE.js.map → upgrade-37F7JKES.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{upgrade-ECB6GH3M.js.map → upgrade-L32JA4TZ.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{validate-MCNMAXVA.js.map → validate-EQTT6WVX.js.map} +0 -0
- /package/dist/cli-bundle/chunks/{validate-J6Q444SD.js.map → validate-XN4I4DPL.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
verifyHistoryChain
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XMBI6TNW.js";
|
|
4
4
|
import {
|
|
5
5
|
hashDocument
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3KLPFWZ4.js";
|
|
7
7
|
import {
|
|
8
8
|
getHistoryPath,
|
|
9
9
|
writeFileAtomic
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FY4SPXSC.js";
|
|
11
11
|
|
|
12
12
|
// dist/core/history/drift-scan.js
|
|
13
13
|
import fs from "fs/promises";
|
|
@@ -188,7 +188,7 @@ async function scanHistoryDrift(pmRoot, items) {
|
|
|
188
188
|
!(function() {
|
|
189
189
|
try {
|
|
190
190
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
191
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
191
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "0913b502-4db3-5424-9ec5-b66ccfb7fc20");
|
|
192
192
|
} catch (e2) {
|
|
193
193
|
}
|
|
194
194
|
})();
|
|
@@ -242,6 +242,11 @@ var REMEDIATION_REGISTRY = Object.freeze([
|
|
|
242
242
|
command: "pm health --check-telemetry",
|
|
243
243
|
summary: "Telemetry events are queued; they flush automatically on the next reachable command. Advisory only."
|
|
244
244
|
},
|
|
245
|
+
{
|
|
246
|
+
code: "telemetry_queue_high_retries",
|
|
247
|
+
command: "pm telemetry flush",
|
|
248
|
+
summary: "Some queued telemetry events are near retry exhaustion; flush now and verify endpoint reachability before entries are dropped."
|
|
249
|
+
},
|
|
245
250
|
{
|
|
246
251
|
code: "telemetry_endpoint_probe_failed",
|
|
247
252
|
command: "pm health --check-telemetry",
|
|
@@ -315,6 +320,11 @@ var REMEDIATION_REGISTRY = Object.freeze([
|
|
|
315
320
|
command: "pm health --refresh-vectors",
|
|
316
321
|
summary: "Some items have stale embeddings; refresh vectors so semantic search results stay current."
|
|
317
322
|
},
|
|
323
|
+
{
|
|
324
|
+
code: "vectorization_embedding_identity_changed",
|
|
325
|
+
command: "pm reindex --mode semantic",
|
|
326
|
+
summary: "Embedding provider/model changed since the last index; run a semantic reindex to rebuild vectors."
|
|
327
|
+
},
|
|
318
328
|
// --- pm validate: metadata ---
|
|
319
329
|
// Note: validate_metadata_missing_author has no entry on purpose. `pm update
|
|
320
330
|
// --author` sets the mutation/audit author (history), not the item's
|
|
@@ -473,4 +483,4 @@ export {
|
|
|
473
483
|
buildRemediationMap,
|
|
474
484
|
buildRemediationCommands
|
|
475
485
|
};
|
|
476
|
-
//# sourceMappingURL=chunk-
|
|
486
|
+
//# sourceMappingURL=chunk-LCSCXBGT.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../../core/history/drift-scan.ts", "../../../../../../../../core/diagnostics/remediation.ts"],
|
|
4
|
-
"sourcesContent": ["import fs from \"fs/promises\";\nimport { createHash } from \"node:crypto\";\nimport path from \"node:path\";\nimport { getHistoryPath } from \"../store/paths.js\";\nimport { writeFileAtomic } from \"../fs/fs-utils.js\";\nimport { hashDocument } from \"./history.js\";\nimport { verifyHistoryChain } from \"./replay.js\";\nimport type { HistoryEntry, ItemMetadata } from \"../../types/index.js\";\n\nexport interface DriftScanResult {\n missingStreams: string[];\n unreadableStreams: string[];\n hashMismatches: string[];\n chainMismatches: string[];\n driftedItems: string[];\n}\n\nconst DRIFT_CACHE_VERSION = 2;\nconst DRIFT_CACHE_FILENAME = \"history-drift-cache.json\";\n\ninterface DriftCacheEntry {\n mtime_ms: number;\n ctime_ms: number;\n size: number;\n content_hash: string;\n latest_after_hash: string;\n chain_ok: boolean;\n}\n\ninterface DriftCacheEnvelope {\n version: number;\n entries: Record<string, DriftCacheEntry>;\n}\n\nfunction getDriftCachePath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", DRIFT_CACHE_FILENAME);\n}\n\nasync function loadDriftCache(pmRoot: string): Promise<DriftCacheEnvelope | null> {\n try {\n const raw = await fs.readFile(getDriftCachePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as DriftCacheEnvelope;\n if (parsed.version !== DRIFT_CACHE_VERSION || typeof parsed.entries !== \"object\" || parsed.entries === null) {\n return null;\n }\n return parsed;\n } catch {\n return null;\n }\n}\n\nfunction isErrno(error: unknown, code: string): boolean {\n return typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code === code;\n}\n\ninterface StreamVerification {\n latestAfterHash: string;\n chainOk: boolean;\n contentHash: string;\n}\n\nfunction hashContent(raw: string): string {\n return createHash(\"sha256\").update(raw).digest(\"hex\");\n}\n\nasync function readHistoryContentHash(historyPath: string): Promise<string> {\n const raw = await fs.readFile(historyPath, \"utf8\");\n return hashContent(raw);\n}\n\n/**\n * Read and fully verify one history stream's hash chain. Returns null for an\n * empty/missing stream (caller records it as a missing stream).\n */\nasync function verifyHistoryStream(historyPath: string): Promise<StreamVerification | null> {\n const raw = await fs.readFile(historyPath, \"utf8\");\n const contentHash = hashContent(raw);\n if (raw.trim().length === 0) {\n return null;\n }\n const entries: HistoryEntry[] = [];\n let latestAfterHash: string | null = null;\n for (const line of raw.split(/\\r?\\n/)) {\n const trimmed = line.trim();\n if (trimmed.length === 0) {\n continue;\n }\n const parsed = JSON.parse(trimmed) as HistoryEntry;\n if (typeof parsed.after_hash !== \"string\" || parsed.after_hash.trim().length === 0) {\n throw new Error(\"missing after_hash\");\n }\n entries.push(parsed);\n latestAfterHash = parsed.after_hash;\n }\n /* c8 ignore start -- defensive guard for future history schema changes. */\n if (!latestAfterHash) {\n return null;\n }\n /* c8 ignore stop */\n return {\n latestAfterHash,\n chainOk: verifyHistoryChain(entries).ok,\n contentHash,\n };\n}\n\n/**\n * Scan every item's history stream for drift (missing/unreadable streams, broken\n * hash chains, and item/history hash mismatches).\n *\n * Full chain re-verification of a 17MB+ history tree is the dominant cost of\n * `pm health`. We cache the per-stream verification keyed by the history file's\n * mtime/ctime/size + content hash: metadata-stable replacements (same stat tuple)\n * can still happen, so each metadata hit recomputes a content hash guard before\n * trusting the cached chain/hash verification.\n */\nexport async function scanHistoryDrift(\n pmRoot: string,\n items: Array<ItemMetadata & { body: string }>,\n): Promise<DriftScanResult> {\n const missingStreams: string[] = [];\n const unreadableStreams: string[] = [];\n const hashMismatches: string[] = [];\n const chainMismatches: string[] = [];\n\n const cache = await loadDriftCache(pmRoot);\n const previousEntries: Record<string, DriftCacheEntry> = cache?.entries ?? {};\n const nextEntries: Record<string, DriftCacheEntry> = {};\n let cacheDirty = false;\n\n for (const item of items) {\n const historyPath = getHistoryPath(pmRoot, item.id);\n\n let stat: Awaited<ReturnType<typeof fs.stat>>;\n try {\n stat = await fs.stat(historyPath);\n } catch (error: unknown) {\n if (isErrno(error, \"ENOENT\")) {\n missingStreams.push(item.id);\n } else {\n unreadableStreams.push(item.id);\n }\n continue;\n }\n\n const loadStreamVerification = async (): Promise<StreamVerification | null | \"unreadable\"> => {\n try {\n return await verifyHistoryStream(historyPath);\n } catch {\n return \"unreadable\";\n }\n };\n\n const loadFreshVerification = async (): Promise<StreamVerification | null> => {\n const loaded = await loadStreamVerification();\n if (loaded === \"unreadable\") {\n unreadableStreams.push(item.id);\n return null;\n }\n if (!loaded) {\n missingStreams.push(item.id);\n return null;\n }\n return loaded;\n };\n\n const cached = previousEntries[item.id];\n let verification: StreamVerification;\n const metadataMatchesCache =\n cached !== undefined &&\n cached.mtime_ms === stat.mtimeMs &&\n cached.ctime_ms === stat.ctimeMs &&\n cached.size === stat.size;\n const cachedContentHash =\n typeof cached?.content_hash === \"string\" && cached.content_hash.length > 0 ? cached.content_hash : undefined;\n const canUseCache = metadataMatchesCache && cachedContentHash !== undefined;\n if (canUseCache && cached) {\n let currentContentHash: string;\n try {\n currentContentHash = await readHistoryContentHash(historyPath);\n } catch {\n unreadableStreams.push(item.id);\n continue;\n }\n if (currentContentHash === cachedContentHash) {\n verification = {\n latestAfterHash: cached.latest_after_hash,\n chainOk: cached.chain_ok,\n contentHash: currentContentHash,\n };\n } else {\n cacheDirty = true;\n const refreshed = await loadFreshVerification();\n if (!refreshed) {\n continue;\n }\n verification = refreshed;\n }\n } else {\n cacheDirty = true;\n const refreshed = await loadFreshVerification();\n if (!refreshed) {\n continue;\n }\n verification = refreshed;\n }\n\n if (!verification.chainOk) {\n chainMismatches.push(item.id);\n }\n nextEntries[item.id] = {\n mtime_ms: stat.mtimeMs,\n ctime_ms: stat.ctimeMs,\n size: stat.size,\n content_hash: verification.contentHash,\n latest_after_hash: verification.latestAfterHash,\n chain_ok: verification.chainOk,\n };\n\n const { body, ...frontMatter } = item;\n const currentHash = hashDocument({\n metadata: frontMatter as ItemMetadata,\n body,\n });\n if (currentHash !== verification.latestAfterHash) {\n hashMismatches.push(item.id);\n }\n }\n\n if (cacheDirty || Object.keys(previousEntries).length !== Object.keys(nextEntries).length) {\n const cachePath = getDriftCachePath(pmRoot);\n try {\n await fs.mkdir(path.dirname(cachePath), { recursive: true });\n await writeFileAtomic(cachePath, JSON.stringify({ version: DRIFT_CACHE_VERSION, entries: nextEntries }));\n } catch {\n // Best-effort cache write: a failed persist must never fail a health scan.\n }\n }\n\n const driftedItems = [...new Set([...missingStreams, ...unreadableStreams, ...hashMismatches, ...chainMismatches])].sort((a, b) =>\n a.localeCompare(b),\n );\n return { missingStreams, unreadableStreams, hashMismatches, chainMismatches, driftedItems };\n}\n", "/**\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"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,SAAS,kBAAkB;AAC3B,OAAO,UAAU;;;;;;;;AAejB,IAAM,sBAAsB;AAC5B,IAAM,uBAAuB;AAgB7B,SAAS,kBAAkB,QAAc;AACvC,SAAO,KAAK,KAAK,QAAQ,WAAW,oBAAoB;AAC1D;AAEA,eAAe,eAAe,QAAc;AAC1C,MAAI;AACF,UAAM,MAAM,MAAM,GAAG,SAAS,kBAAkB,MAAM,GAAG,MAAM;AAC/D,UAAM,SAAS,KAAK,MAAM,GAAG;AAC7B,QAAI,OAAO,YAAY,uBAAuB,OAAO,OAAO,YAAY,YAAY,OAAO,YAAY,MAAM;AAC3G,aAAO;IACT;AACA,WAAO;EACT,QAAQ;AACN,WAAO;EACT;AACF;AAEA,SAAS,QAAQ,OAAgB,MAAY;AAC3C,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,UAAU,SAAU,MAA4B,SAAS;AACjH;AAQA,SAAS,YAAY,KAAW;AAC9B,SAAO,WAAW,QAAQ,EAAE,OAAO,GAAG,EAAE,OAAO,KAAK;AACtD;AAEA,eAAe,uBAAuB,aAAmB;AACvD,QAAM,MAAM,MAAM,GAAG,SAAS,aAAa,MAAM;AACjD,SAAO,YAAY,GAAG;AACxB;AAMA,eAAe,oBAAoB,aAAmB;AACpD,QAAM,MAAM,MAAM,GAAG,SAAS,aAAa,MAAM;AACjD,QAAM,cAAc,YAAY,GAAG;AACnC,MAAI,IAAI,KAAI,EAAG,WAAW,GAAG;AAC3B,WAAO;EACT;AACA,QAAM,UAA0B,CAAA;AAChC,MAAI,kBAAiC;AACrC,aAAW,QAAQ,IAAI,MAAM,OAAO,GAAG;AACrC,UAAM,UAAU,KAAK,KAAI;AACzB,QAAI,QAAQ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AAG,GAAG;AACxE,aAAO;IACT;EACF;AACA,SAAO;AACT;AAQM,SAAU,oBAAoB,UAA0B;AAC5D,QAAM,MAA8B,CAAA;AACpC,aAAW,WAAW,UAAU;AAC9B,UAAM,QAAQ,mBAAmB,OAAO;AACxC,QAAI,UAAU,UAAa,CAAC,OAAO,UAAU,eAAe,KAAK,KAAK,MAAM,IAAI,GAAG;AACjF,UAAI,MAAM,IAAI,IAAI,MAAM;IAC1B;EACF;AACA,SAAO;AACT;AAQM,SAAU,yBAAyB,UAA0B;AACjE,SAAO,OAAO,OAAO,oBAAoB,QAAQ,CAAC;AACpD;",
|
|
4
|
+
"sourcesContent": ["import fs from \"fs/promises\";\nimport { createHash } from \"node:crypto\";\nimport path from \"node:path\";\nimport { getHistoryPath } from \"../store/paths.js\";\nimport { writeFileAtomic } from \"../fs/fs-utils.js\";\nimport { hashDocument } from \"./history.js\";\nimport { verifyHistoryChain } from \"./replay.js\";\nimport type { HistoryEntry, ItemMetadata } from \"../../types/index.js\";\n\nexport interface DriftScanResult {\n missingStreams: string[];\n unreadableStreams: string[];\n hashMismatches: string[];\n chainMismatches: string[];\n driftedItems: string[];\n}\n\nconst DRIFT_CACHE_VERSION = 2;\nconst DRIFT_CACHE_FILENAME = \"history-drift-cache.json\";\n\ninterface DriftCacheEntry {\n mtime_ms: number;\n ctime_ms: number;\n size: number;\n content_hash: string;\n latest_after_hash: string;\n chain_ok: boolean;\n}\n\ninterface DriftCacheEnvelope {\n version: number;\n entries: Record<string, DriftCacheEntry>;\n}\n\nfunction getDriftCachePath(pmRoot: string): string {\n return path.join(pmRoot, \"runtime\", DRIFT_CACHE_FILENAME);\n}\n\nasync function loadDriftCache(pmRoot: string): Promise<DriftCacheEnvelope | null> {\n try {\n const raw = await fs.readFile(getDriftCachePath(pmRoot), \"utf8\");\n const parsed = JSON.parse(raw) as DriftCacheEnvelope;\n if (parsed.version !== DRIFT_CACHE_VERSION || typeof parsed.entries !== \"object\" || parsed.entries === null) {\n return null;\n }\n return parsed;\n } catch {\n return null;\n }\n}\n\nfunction isErrno(error: unknown, code: string): boolean {\n return typeof error === \"object\" && error !== null && \"code\" in error && (error as { code?: string }).code === code;\n}\n\ninterface StreamVerification {\n latestAfterHash: string;\n chainOk: boolean;\n contentHash: string;\n}\n\nfunction hashContent(raw: string): string {\n return createHash(\"sha256\").update(raw).digest(\"hex\");\n}\n\nasync function readHistoryContentHash(historyPath: string): Promise<string> {\n const raw = await fs.readFile(historyPath, \"utf8\");\n return hashContent(raw);\n}\n\n/**\n * Read and fully verify one history stream's hash chain. Returns null for an\n * empty/missing stream (caller records it as a missing stream).\n */\nasync function verifyHistoryStream(historyPath: string): Promise<StreamVerification | null> {\n const raw = await fs.readFile(historyPath, \"utf8\");\n const contentHash = hashContent(raw);\n if (raw.trim().length === 0) {\n return null;\n }\n const entries: HistoryEntry[] = [];\n let latestAfterHash: string | null = null;\n for (const line of raw.split(/\\r?\\n/)) {\n const trimmed = line.trim();\n if (trimmed.length === 0) {\n continue;\n }\n const parsed = JSON.parse(trimmed) as HistoryEntry;\n if (typeof parsed.after_hash !== \"string\" || parsed.after_hash.trim().length === 0) {\n throw new Error(\"missing after_hash\");\n }\n entries.push(parsed);\n latestAfterHash = parsed.after_hash;\n }\n /* c8 ignore start -- defensive guard for future history schema changes. */\n if (!latestAfterHash) {\n return null;\n }\n /* c8 ignore stop */\n return {\n latestAfterHash,\n chainOk: verifyHistoryChain(entries).ok,\n contentHash,\n };\n}\n\n/**\n * Scan every item's history stream for drift (missing/unreadable streams, broken\n * hash chains, and item/history hash mismatches).\n *\n * Full chain re-verification of a 17MB+ history tree is the dominant cost of\n * `pm health`. We cache the per-stream verification keyed by the history file's\n * mtime/ctime/size + content hash: metadata-stable replacements (same stat tuple)\n * can still happen, so each metadata hit recomputes a content hash guard before\n * trusting the cached chain/hash verification.\n */\nexport async function scanHistoryDrift(\n pmRoot: string,\n items: Array<ItemMetadata & { body: string }>,\n): Promise<DriftScanResult> {\n const missingStreams: string[] = [];\n const unreadableStreams: string[] = [];\n const hashMismatches: string[] = [];\n const chainMismatches: string[] = [];\n\n const cache = await loadDriftCache(pmRoot);\n const previousEntries: Record<string, DriftCacheEntry> = cache?.entries ?? {};\n const nextEntries: Record<string, DriftCacheEntry> = {};\n let cacheDirty = false;\n\n for (const item of items) {\n const historyPath = getHistoryPath(pmRoot, item.id);\n\n let stat: Awaited<ReturnType<typeof fs.stat>>;\n try {\n stat = await fs.stat(historyPath);\n } catch (error: unknown) {\n if (isErrno(error, \"ENOENT\")) {\n missingStreams.push(item.id);\n } else {\n unreadableStreams.push(item.id);\n }\n continue;\n }\n\n const loadStreamVerification = async (): Promise<StreamVerification | null | \"unreadable\"> => {\n try {\n return await verifyHistoryStream(historyPath);\n } catch {\n return \"unreadable\";\n }\n };\n\n const loadFreshVerification = async (): Promise<StreamVerification | null> => {\n const loaded = await loadStreamVerification();\n if (loaded === \"unreadable\") {\n unreadableStreams.push(item.id);\n return null;\n }\n if (!loaded) {\n missingStreams.push(item.id);\n return null;\n }\n return loaded;\n };\n\n const cached = previousEntries[item.id];\n let verification: StreamVerification;\n const metadataMatchesCache =\n cached !== undefined &&\n cached.mtime_ms === stat.mtimeMs &&\n cached.ctime_ms === stat.ctimeMs &&\n cached.size === stat.size;\n const cachedContentHash =\n typeof cached?.content_hash === \"string\" && cached.content_hash.length > 0 ? cached.content_hash : undefined;\n const canUseCache = metadataMatchesCache && cachedContentHash !== undefined;\n if (canUseCache && cached) {\n let currentContentHash: string;\n try {\n currentContentHash = await readHistoryContentHash(historyPath);\n } catch {\n unreadableStreams.push(item.id);\n continue;\n }\n if (currentContentHash === cachedContentHash) {\n verification = {\n latestAfterHash: cached.latest_after_hash,\n chainOk: cached.chain_ok,\n contentHash: currentContentHash,\n };\n } else {\n cacheDirty = true;\n const refreshed = await loadFreshVerification();\n if (!refreshed) {\n continue;\n }\n verification = refreshed;\n }\n } else {\n cacheDirty = true;\n const refreshed = await loadFreshVerification();\n if (!refreshed) {\n continue;\n }\n verification = refreshed;\n }\n\n if (!verification.chainOk) {\n chainMismatches.push(item.id);\n }\n nextEntries[item.id] = {\n mtime_ms: stat.mtimeMs,\n ctime_ms: stat.ctimeMs,\n size: stat.size,\n content_hash: verification.contentHash,\n latest_after_hash: verification.latestAfterHash,\n chain_ok: verification.chainOk,\n };\n\n const { body, ...frontMatter } = item;\n const currentHash = hashDocument({\n metadata: frontMatter as ItemMetadata,\n body,\n });\n if (currentHash !== verification.latestAfterHash) {\n hashMismatches.push(item.id);\n }\n }\n\n if (cacheDirty || Object.keys(previousEntries).length !== Object.keys(nextEntries).length) {\n const cachePath = getDriftCachePath(pmRoot);\n try {\n await fs.mkdir(path.dirname(cachePath), { recursive: true });\n await writeFileAtomic(cachePath, JSON.stringify({ version: DRIFT_CACHE_VERSION, entries: nextEntries }));\n } catch {\n // Best-effort cache write: a failed persist must never fail a health scan.\n }\n }\n\n const driftedItems = [...new Set([...missingStreams, ...unreadableStreams, ...hashMismatches, ...chainMismatches])].sort((a, b) =>\n a.localeCompare(b),\n );\n return { missingStreams, unreadableStreams, hashMismatches, chainMismatches, driftedItems };\n}\n", "/**\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_queue_high_retries\",\n command: \"pm telemetry flush\",\n summary:\n \"Some queued telemetry events are near retry exhaustion; flush now and verify endpoint reachability before entries are dropped.\",\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 {\n code: \"vectorization_embedding_identity_changed\",\n command: \"pm reindex --mode semantic\",\n summary: \"Embedding provider/model changed since the last index; run a semantic reindex to rebuild vectors.\",\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,SAAS,kBAAkB;AAC3B,OAAO,UAAU;;;;;;;;AAejB,IAAM,sBAAsB;AAC5B,IAAM,uBAAuB;AAgB7B,SAAS,kBAAkB,QAAc;AACvC,SAAO,KAAK,KAAK,QAAQ,WAAW,oBAAoB;AAC1D;AAEA,eAAe,eAAe,QAAc;AAC1C,MAAI;AACF,UAAM,MAAM,MAAM,GAAG,SAAS,kBAAkB,MAAM,GA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oB,QAAQ,CAAC;AACpD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,21 +5,21 @@ import {
|
|
|
5
5
|
} from "./chunk-J27KIHTG.js";
|
|
6
6
|
import {
|
|
7
7
|
parseCsvKv
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-I7NYDZDV.js";
|
|
9
9
|
import {
|
|
10
10
|
parseLimit
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-P5U5EOMA.js";
|
|
12
12
|
import {
|
|
13
13
|
locateItem,
|
|
14
14
|
mutateItem,
|
|
15
15
|
readLocatedItem
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HI7STVF2.js";
|
|
17
17
|
import {
|
|
18
18
|
resolveItemTypeRegistry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CCX4RSYZ.js";
|
|
20
20
|
import {
|
|
21
21
|
nowIso
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WUNFKP7M.js";
|
|
23
23
|
import {
|
|
24
24
|
EXIT_CODE,
|
|
25
25
|
PmCliError,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
pathExists,
|
|
29
29
|
readSettings,
|
|
30
30
|
resolvePmRoot
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-A6LXQFO7.js";
|
|
32
32
|
|
|
33
33
|
// dist/cli/commands/annotation-command.js
|
|
34
34
|
function limitAnnotationEntries(values, limit) {
|
|
@@ -149,6 +149,6 @@ export {
|
|
|
149
149
|
wrapOwnershipConflict,
|
|
150
150
|
runAnnotationCommand
|
|
151
151
|
};
|
|
152
|
-
//# sourceMappingURL=chunk-
|
|
152
|
+
//# sourceMappingURL=chunk-OASDW5UI.js.map
|
|
153
153
|
|
|
154
154
|
//# debugId=2663dc72-ebe4-5c50-8d4c-28022abebefe
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BUILTIN_ITEM_TYPE_VALUES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FY4SPXSC.js";
|
|
4
4
|
|
|
5
5
|
// dist/core/schema/item-types-file.js
|
|
6
6
|
!(function() {
|
|
@@ -218,4 +218,4 @@ export {
|
|
|
218
218
|
buildInvalidTypeHint,
|
|
219
219
|
buildInvalidTypeError
|
|
220
220
|
};
|
|
221
|
-
//# sourceMappingURL=chunk-
|
|
221
|
+
//# sourceMappingURL=chunk-OLKBSY4N.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
PLAN_MODE_VALUES,
|
|
10
10
|
PLAN_STEP_LINK_KIND_VALUES,
|
|
11
11
|
PLAN_STEP_STATUS_VALUES
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FY4SPXSC.js";
|
|
13
13
|
|
|
14
14
|
// dist/sdk/cli-contracts/commander-types.js
|
|
15
15
|
!(function() {
|
|
@@ -131,7 +131,7 @@ function readStringArrayFromCommanderOptions(options, contract) {
|
|
|
131
131
|
!(function() {
|
|
132
132
|
try {
|
|
133
133
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
134
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
134
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "4974eb3c-5c74-5df9-ac5d-4f9e476175e4");
|
|
135
135
|
} catch (e2) {
|
|
136
136
|
}
|
|
137
137
|
})();
|
|
@@ -219,6 +219,7 @@ var CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS = [
|
|
|
219
219
|
{ target: "message", keys: ["message"], option: "--message <value>", description: "History message (allow empty string)" },
|
|
220
220
|
{ target: "assignee", keys: ["assignee"], option: "--assignee <value>", description: "Item assignee" },
|
|
221
221
|
{ target: "parent", keys: ["parent"], option: "--parent <value>", description: "Parent item ID" },
|
|
222
|
+
{ target: "allowMissingParent", keys: ["allowMissingParent", "allow_missing_parent"], option: "--allow-missing-parent", description: "Allow creating with an unresolved parent reference and emit a validation warning" },
|
|
222
223
|
{ target: "reviewer", keys: ["reviewer"], option: "--reviewer <value>", description: "Reviewer" },
|
|
223
224
|
{ target: "risk", keys: ["risk"], option: "--risk <value>", description: "Risk level: low|med|medium|high|critical (med persists as medium)" },
|
|
224
225
|
{
|
|
@@ -815,7 +816,7 @@ var PM_TOOL_ACTIONS = [
|
|
|
815
816
|
!(function() {
|
|
816
817
|
try {
|
|
817
818
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
818
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
819
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b0bd4729-8835-5261-bc99-c9645c75e1a8");
|
|
819
820
|
} catch (e2) {
|
|
820
821
|
}
|
|
821
822
|
})();
|
|
@@ -936,6 +937,7 @@ var TOOL_CREATE_OPTION_CONTRACTS = [
|
|
|
936
937
|
{ param: "author", flag: "--author" },
|
|
937
938
|
{ param: "message", flag: "--message", allowEmpty: true },
|
|
938
939
|
{ param: "assignee", flag: "--assignee" },
|
|
940
|
+
{ param: "allowMissingParent", flag: "--allow-missing-parent" },
|
|
939
941
|
{ param: "reminder", flag: "--reminder", repeatable: true },
|
|
940
942
|
{ param: "event", flag: "--event", repeatable: true },
|
|
941
943
|
{ param: "typeOption", flag: "--type-option", repeatable: true },
|
|
@@ -1092,7 +1094,7 @@ var TOOL_CONTEXT_OPTION_CONTRACTS = [
|
|
|
1092
1094
|
!(function() {
|
|
1093
1095
|
try {
|
|
1094
1096
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
1095
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
1097
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "28cc182a-a139-5258-a9c6-5cc6b60e18c3");
|
|
1096
1098
|
} catch (e2) {
|
|
1097
1099
|
}
|
|
1098
1100
|
})();
|
|
@@ -1129,6 +1131,10 @@ var PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
1129
1131
|
runtimeOnly: { type: "boolean" },
|
|
1130
1132
|
activeOnly: { type: "boolean" },
|
|
1131
1133
|
eagerTags: { type: "boolean" },
|
|
1134
|
+
fullChangedFields: { type: "boolean" },
|
|
1135
|
+
idOnly: { type: "boolean" },
|
|
1136
|
+
allowMissingParent: { type: "boolean" },
|
|
1137
|
+
duplicateOf: { type: "string" },
|
|
1132
1138
|
configAction: { type: "string", enum: ["get", "set", "list", "export"] },
|
|
1133
1139
|
key: { type: "string" },
|
|
1134
1140
|
title: { type: "string" },
|
|
@@ -1242,6 +1248,10 @@ var PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
1242
1248
|
anyOf: [{ type: "boolean" }, { type: "string", enum: ["stdout", "stderr", "both", "rows", "ndjson", "jsonl"] }]
|
|
1243
1249
|
},
|
|
1244
1250
|
tail: { anyOf: [{ type: "string" }, { type: "number" }] },
|
|
1251
|
+
addJson: { type: "array", items: { type: "string" } },
|
|
1252
|
+
match: { type: "string" },
|
|
1253
|
+
onlyIndex: { anyOf: [{ type: "string" }, { type: "number" }] },
|
|
1254
|
+
onlyLast: { type: "boolean" },
|
|
1245
1255
|
envSet: { type: "array", items: { type: "string" } },
|
|
1246
1256
|
envClear: { type: "array", items: { type: "string" } },
|
|
1247
1257
|
sharedHostSafe: { type: "boolean" },
|
|
@@ -1369,6 +1379,7 @@ var PM_TOOL_PARAMETER_PROPERTIES = {
|
|
|
1369
1379
|
criterion: { type: "array", items: { type: "string" } },
|
|
1370
1380
|
clearCriteria: { type: "boolean" },
|
|
1371
1381
|
groupBy: { type: "string" },
|
|
1382
|
+
completion: { type: "boolean" },
|
|
1372
1383
|
threshold: { anyOf: [{ type: "string" }, { type: "number" }] },
|
|
1373
1384
|
format: { type: "string" },
|
|
1374
1385
|
depth: { type: "string", enum: ["brief", "standard", "deep"] },
|
|
@@ -1739,6 +1750,21 @@ var PM_TOOL_PARAMETER_METADATA = {
|
|
|
1739
1750
|
background: {
|
|
1740
1751
|
description: "Run linked tests in managed background mode."
|
|
1741
1752
|
},
|
|
1753
|
+
addJson: {
|
|
1754
|
+
description: "Repeatable JSON object or array input for adding linked-test entries without CSV escaping loss.",
|
|
1755
|
+
examples: [[`{"command":"node scripts/run-tests.mjs test -- tests/unit/output.spec.ts","timeout_seconds":240}`]]
|
|
1756
|
+
},
|
|
1757
|
+
match: {
|
|
1758
|
+
description: "Run only linked tests whose command or path contains this case-insensitive substring.",
|
|
1759
|
+
examples: ["output.spec.ts", "coverage"]
|
|
1760
|
+
},
|
|
1761
|
+
onlyIndex: {
|
|
1762
|
+
description: "Run only the 1-based linked-test index from pm test <id> --list order.",
|
|
1763
|
+
examples: [1, "2"]
|
|
1764
|
+
},
|
|
1765
|
+
onlyLast: {
|
|
1766
|
+
description: "Run only the most recently added linked-test entry."
|
|
1767
|
+
},
|
|
1742
1768
|
envSet: {
|
|
1743
1769
|
description: "Repeatable runtime environment KEY=VALUE overrides for linked-test execution.",
|
|
1744
1770
|
examples: [["PORT=0", "PLAYWRIGHT_HTML_OPEN=never"]]
|
|
@@ -1983,6 +2009,9 @@ var PM_TOOL_PARAMETER_METADATA = {
|
|
|
1983
2009
|
count: {
|
|
1984
2010
|
description: "Enable grouped count output for aggregate action."
|
|
1985
2011
|
},
|
|
2012
|
+
completion: {
|
|
2013
|
+
description: "For aggregate action, add open/in_progress/closed/other counts and completion_pct per group."
|
|
2014
|
+
},
|
|
1986
2015
|
sum: {
|
|
1987
2016
|
description: "Numeric field to sum per aggregate group (count and null_count are still returned).",
|
|
1988
2017
|
examples: ["estimated_minutes", "priority"]
|
|
@@ -2068,7 +2097,7 @@ var PM_TOOL_PARAMETER_METADATA = {
|
|
|
2068
2097
|
!(function() {
|
|
2069
2098
|
try {
|
|
2070
2099
|
var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
|
|
2071
|
-
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "
|
|
2100
|
+
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9091cd85-ff8e-55db-b56e-c5fc84e60632");
|
|
2072
2101
|
} catch (e2) {
|
|
2073
2102
|
}
|
|
2074
2103
|
})();
|
|
@@ -2123,6 +2152,7 @@ var SUBCOMMAND_GLOBAL_FLAG_CONTRACTS = [
|
|
|
2123
2152
|
{ flag: "--json" },
|
|
2124
2153
|
{ flag: "--quiet" },
|
|
2125
2154
|
{ flag: "--no-changed-fields" },
|
|
2155
|
+
{ flag: "--id-only" },
|
|
2126
2156
|
{ flag: "--pm-path", aliases: ["--path"] },
|
|
2127
2157
|
{ flag: "--no-extensions" },
|
|
2128
2158
|
{ flag: "--no-pager" },
|
|
@@ -2168,6 +2198,7 @@ var LIST_FILTER_FLAG_CONTRACTS = [
|
|
|
2168
2198
|
var AGGREGATE_FLAG_CONTRACTS = [
|
|
2169
2199
|
{ flag: "--group-by", list: true },
|
|
2170
2200
|
{ flag: "--count" },
|
|
2201
|
+
{ flag: "--completion" },
|
|
2171
2202
|
{ flag: "--sum" },
|
|
2172
2203
|
{ flag: "--avg" },
|
|
2173
2204
|
{ flag: "--include-unparented" },
|
|
@@ -2489,6 +2520,7 @@ var REINDEX_FLAG_CONTRACTS = [
|
|
|
2489
2520
|
var CLOSE_FLAG_CONTRACTS = [
|
|
2490
2521
|
{ flag: "--reason" },
|
|
2491
2522
|
{ flag: "--close-reason" },
|
|
2523
|
+
{ flag: "--duplicate-of" },
|
|
2492
2524
|
{ flag: "--author" },
|
|
2493
2525
|
{ flag: "--message" },
|
|
2494
2526
|
{ flag: "--validate-close" },
|
|
@@ -2579,8 +2611,12 @@ var CLOSE_TASK_FLAG_CONTRACTS = [
|
|
|
2579
2611
|
];
|
|
2580
2612
|
var TEST_FLAG_CONTRACTS = [
|
|
2581
2613
|
{ flag: "--add" },
|
|
2614
|
+
{ flag: "--add-json" },
|
|
2582
2615
|
{ flag: "--remove" },
|
|
2583
2616
|
{ flag: "--run" },
|
|
2617
|
+
{ flag: "--match" },
|
|
2618
|
+
{ flag: "--only-index" },
|
|
2619
|
+
{ flag: "--only-last" },
|
|
2584
2620
|
{ flag: "--background" },
|
|
2585
2621
|
{ flag: "--timeout" },
|
|
2586
2622
|
{ flag: "--progress" },
|
|
@@ -2699,6 +2735,7 @@ var CREATE_FLAG_CONTRACTS = [
|
|
|
2699
2735
|
{ flag: "--message" },
|
|
2700
2736
|
{ flag: "--assignee" },
|
|
2701
2737
|
{ flag: "--parent" },
|
|
2738
|
+
{ flag: "--allow-missing-parent" },
|
|
2702
2739
|
{ flag: "--reviewer" },
|
|
2703
2740
|
{ flag: "--risk" },
|
|
2704
2741
|
{ flag: "--confidence" },
|
|
@@ -3299,7 +3336,25 @@ function resolveSubcommandFlagContractsForCommand(commandName) {
|
|
|
3299
3336
|
return withSubcommandGlobalFlags([]);
|
|
3300
3337
|
}
|
|
3301
3338
|
}
|
|
3302
|
-
var PM_TOOL_GLOBAL_PARAMETER_KEYS = [
|
|
3339
|
+
var PM_TOOL_GLOBAL_PARAMETER_KEYS = [
|
|
3340
|
+
"json",
|
|
3341
|
+
"quiet",
|
|
3342
|
+
"profile",
|
|
3343
|
+
"noExtensions",
|
|
3344
|
+
"noPager",
|
|
3345
|
+
"path",
|
|
3346
|
+
"pmExecutable",
|
|
3347
|
+
"timeoutMs"
|
|
3348
|
+
];
|
|
3349
|
+
var PM_TOOL_ACTION_MUTATION_PARAMETER_KEYS = {
|
|
3350
|
+
create: ["fullChangedFields", "idOnly"],
|
|
3351
|
+
copy: ["fullChangedFields", "idOnly"],
|
|
3352
|
+
update: ["fullChangedFields", "idOnly"],
|
|
3353
|
+
close: ["fullChangedFields", "idOnly"],
|
|
3354
|
+
append: ["fullChangedFields"],
|
|
3355
|
+
"update-many": ["fullChangedFields"],
|
|
3356
|
+
"close-many": ["fullChangedFields"]
|
|
3357
|
+
};
|
|
3303
3358
|
function toSchemaKeyList(values) {
|
|
3304
3359
|
return normalizeUniqueStringList(values);
|
|
3305
3360
|
}
|
|
@@ -3362,6 +3417,7 @@ var LIST_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
|
|
|
3362
3417
|
var AGGREGATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
|
|
3363
3418
|
...TOOL_AGGREGATE_OPTION_CONTRACTS.map((entry) => entry.param),
|
|
3364
3419
|
"count",
|
|
3420
|
+
"completion",
|
|
3365
3421
|
"includeUnparented"
|
|
3366
3422
|
]);
|
|
3367
3423
|
var DEDUPE_AUDIT_CONTRACT_PARAMETER_KEYS = toSchemaKeyList(TOOL_DEDUPE_AUDIT_OPTION_CONTRACTS.map((entry) => entry.param));
|
|
@@ -3589,7 +3645,7 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
3589
3645
|
update: { required: ["id"], optional: UPDATE_CONTRACT_PARAMETER_KEYS },
|
|
3590
3646
|
"update-many": { optional: UPDATE_MANY_CONTRACT_PARAMETER_KEYS },
|
|
3591
3647
|
normalize: { optional: NORMALIZE_CONTRACT_PARAMETER_KEYS },
|
|
3592
|
-
close: { required: ["id"], optional: ["text", "validateClose", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
|
|
3648
|
+
close: { required: ["id"], optional: ["text", "duplicateOf", "validateClose", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
|
|
3593
3649
|
"close-many": { optional: CLOSE_MANY_CONTRACT_PARAMETER_KEYS },
|
|
3594
3650
|
delete: { required: ["id"], optional: ["dryRun", ...AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS] },
|
|
3595
3651
|
append: { required: ["id", "body"], optional: AUTHOR_MESSAGE_FORCE_PARAMETER_KEYS },
|
|
@@ -3647,8 +3703,12 @@ var PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
3647
3703
|
required: ["id"],
|
|
3648
3704
|
optional: [
|
|
3649
3705
|
"add",
|
|
3706
|
+
"addJson",
|
|
3650
3707
|
"remove",
|
|
3651
3708
|
"run",
|
|
3709
|
+
"match",
|
|
3710
|
+
"onlyIndex",
|
|
3711
|
+
"onlyLast",
|
|
3652
3712
|
"background",
|
|
3653
3713
|
"timeout",
|
|
3654
3714
|
"progress",
|
|
@@ -3793,7 +3853,8 @@ function buildActionScopedToolSchema(action) {
|
|
|
3793
3853
|
const contract = PM_TOOL_ACTION_SCHEMA_CONTRACTS[action];
|
|
3794
3854
|
const required = toSchemaKeyList(contract.required ?? []);
|
|
3795
3855
|
const optional = toSchemaKeyList(contract.optional ?? []);
|
|
3796
|
-
const
|
|
3856
|
+
const mutationParameterKeys = PM_TOOL_ACTION_MUTATION_PARAMETER_KEYS[action] ?? [];
|
|
3857
|
+
const allowedKeys = toSchemaKeyList([...PM_TOOL_GLOBAL_PARAMETER_KEYS, ...mutationParameterKeys, ...required, ...optional]);
|
|
3797
3858
|
const properties = {
|
|
3798
3859
|
action: {
|
|
3799
3860
|
const: action,
|
|
@@ -4001,4 +4062,4 @@ export {
|
|
|
4001
4062
|
resolveSubcommandFlagContractsForCommand,
|
|
4002
4063
|
PM_TOOL_PARAMETERS_SCHEMA
|
|
4003
4064
|
};
|
|
4004
|
-
//# sourceMappingURL=chunk-
|
|
4065
|
+
//# sourceMappingURL=chunk-P2PSODAQ.js.map
|