@unbrained/pm-cli 2026.6.7 → 2026.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (460) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/AGENTS.md +1 -1
  3. package/CHANGELOG.md +42 -0
  4. package/CONTRIBUTING.md +1 -1
  5. package/README.md +1 -1
  6. package/dist/cli/bootstrap-args.js +30 -13
  7. package/dist/cli/bootstrap-args.js.map +1 -1
  8. package/dist/cli/commands/close-many.js +9 -3
  9. package/dist/cli/commands/close-many.js.map +1 -1
  10. package/dist/cli/commands/close.js +15 -3
  11. package/dist/cli/commands/close.js.map +1 -1
  12. package/dist/cli/commands/comments-audit.js +4 -3
  13. package/dist/cli/commands/comments-audit.js.map +1 -1
  14. package/dist/cli/commands/completion.js +40 -33
  15. package/dist/cli/commands/completion.js.map +1 -1
  16. package/dist/cli/commands/extension/scaffold.js +6 -14
  17. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  18. package/dist/cli/commands/gc.js +10 -2
  19. package/dist/cli/commands/gc.js.map +1 -1
  20. package/dist/cli/commands/health.js +10 -2
  21. package/dist/cli/commands/health.js.map +1 -1
  22. package/dist/cli/commands/index.d.ts +1 -1
  23. package/dist/cli/commands/index.js +3 -3
  24. package/dist/cli/commands/index.js.map +1 -1
  25. package/dist/cli/commands/init.d.ts +1 -0
  26. package/dist/cli/commands/init.js +48 -2
  27. package/dist/cli/commands/init.js.map +1 -1
  28. package/dist/cli/commands/list.d.ts +11 -2
  29. package/dist/cli/commands/list.js +104 -2
  30. package/dist/cli/commands/list.js.map +1 -1
  31. package/dist/cli/commands/normalize.js +6 -4
  32. package/dist/cli/commands/normalize.js.map +1 -1
  33. package/dist/cli/commands/schema.d.ts +13 -2
  34. package/dist/cli/commands/schema.js +66 -12
  35. package/dist/cli/commands/schema.js.map +1 -1
  36. package/dist/cli/commands/search.d.ts +10 -2
  37. package/dist/cli/commands/search.js +94 -5
  38. package/dist/cli/commands/search.js.map +1 -1
  39. package/dist/cli/commands/upgrade.js +4 -12
  40. package/dist/cli/commands/upgrade.js.map +1 -1
  41. package/dist/cli/main.js +7 -18
  42. package/dist/cli/main.js.map +1 -1
  43. package/dist/cli/register-list-query.js +5 -3
  44. package/dist/cli/register-list-query.js.map +1 -1
  45. package/dist/cli/register-mutation.js +33 -24
  46. package/dist/cli/register-mutation.js.map +1 -1
  47. package/dist/cli/register-setup.js +4 -2
  48. package/dist/cli/register-setup.js.map +1 -1
  49. package/dist/cli/registration-helpers.js +7 -3
  50. package/dist/cli/registration-helpers.js.map +1 -1
  51. package/dist/cli-bundle/chunks/activity-A3QKFSSF.js +16 -0
  52. package/dist/cli-bundle/chunks/{activity-YVB3QRTE.js → activity-Q7XMIZIH.js} +11 -11
  53. package/dist/cli-bundle/chunks/{aggregate-LH66F75F.js → aggregate-GBSHSXOB.js} +10 -10
  54. package/dist/cli-bundle/chunks/{aggregate-OHSWFQJM.js → aggregate-HKQJZUBG.js} +10 -10
  55. package/dist/cli-bundle/chunks/{append-2PPYFAG5.js → append-3RFOU7P5.js} +8 -8
  56. package/dist/cli-bundle/chunks/{append-AUGT5W6J.js → append-OM74OJVT.js} +8 -8
  57. package/dist/cli-bundle/chunks/{chunk-HRMHZ4RV.js → chunk-2BYKYPWY.js} +2 -2
  58. package/dist/cli-bundle/chunks/{chunk-TP4DDY27.js → chunk-2HMD3JM2.js} +6 -6
  59. package/dist/cli-bundle/chunks/{chunk-4CHEG6UK.js → chunk-2YPVCD7T.js} +8 -8
  60. package/dist/cli-bundle/chunks/{chunk-WAA7UI6M.js → chunk-3E3MDBTB.js} +10 -14
  61. package/dist/cli-bundle/chunks/chunk-3E3MDBTB.js.map +7 -0
  62. package/dist/cli-bundle/chunks/{chunk-UJUT6AHZ.js → chunk-3TXWDGPU.js} +48 -12
  63. package/dist/cli-bundle/chunks/chunk-3TXWDGPU.js.map +7 -0
  64. package/dist/cli-bundle/chunks/{chunk-UT6WFXW2.js → chunk-4TI3532H.js} +2 -2
  65. package/dist/cli-bundle/chunks/{chunk-KNGVP5WJ.js → chunk-4WYBLB6J.js} +3 -3
  66. package/dist/cli-bundle/chunks/{chunk-V6EYFTRL.js → chunk-5NVJA7IW.js} +7 -7
  67. package/dist/cli-bundle/chunks/{chunk-42LOFGJS.js → chunk-5WO2VKFA.js} +108 -9
  68. package/dist/cli-bundle/chunks/chunk-5WO2VKFA.js.map +7 -0
  69. package/dist/cli-bundle/chunks/{chunk-QQL5QSTZ.js → chunk-7NQIY7Z6.js} +6 -5
  70. package/dist/cli-bundle/chunks/chunk-7NQIY7Z6.js.map +1 -0
  71. package/dist/cli-bundle/chunks/{chunk-KR6R465K.js → chunk-7WXGR44E.js} +5 -5
  72. package/dist/cli-bundle/chunks/{chunk-KR6R465K.js.map → chunk-7WXGR44E.js.map} +2 -2
  73. package/dist/cli-bundle/chunks/{chunk-WYEXLDDY.js → chunk-AEMKH5WQ.js} +3 -3
  74. package/dist/cli-bundle/chunks/{chunk-XS3O2TFJ.js → chunk-ALSRBNYB.js} +8 -8
  75. package/dist/cli-bundle/chunks/chunk-ALSRBNYB.js.map +1 -0
  76. package/dist/cli-bundle/chunks/{chunk-OKSKJKHX.js → chunk-AXBUHLW7.js} +9 -9
  77. package/dist/cli-bundle/chunks/{chunk-UEWA73ZZ.js → chunk-BFJPMUF5.js} +5 -5
  78. package/dist/cli-bundle/chunks/{chunk-B5RF3IP7.js → chunk-BKQMJXWY.js} +3 -3
  79. package/dist/cli-bundle/chunks/{chunk-HV5SSZXF.js → chunk-CBJXWXI5.js} +2 -2
  80. package/dist/cli-bundle/chunks/{chunk-NHR2QXXZ.js → chunk-D7WK2PKB.js} +20 -8
  81. package/dist/cli-bundle/chunks/chunk-D7WK2PKB.js.map +1 -0
  82. package/dist/cli-bundle/chunks/{chunk-MWRS7Z4P.js → chunk-DV27WDA7.js} +15 -13
  83. package/dist/cli-bundle/chunks/chunk-DV27WDA7.js.map +7 -0
  84. package/dist/cli-bundle/chunks/{chunk-LI65XLJR.js → chunk-EPWT7BEA.js} +8 -8
  85. package/dist/cli-bundle/chunks/{chunk-LMTOY5HE.js → chunk-ETZZU5QF.js} +2 -2
  86. package/dist/cli-bundle/chunks/{chunk-XYNT7UFP.js → chunk-F33AQIB4.js} +6 -6
  87. package/dist/cli-bundle/chunks/{chunk-XYNT7UFP.js.map → chunk-F33AQIB4.js.map} +1 -1
  88. package/dist/cli-bundle/chunks/{chunk-LIN2BPJ7.js → chunk-F33VC5EX.js} +2 -2
  89. package/dist/cli-bundle/chunks/{chunk-SFFVGNHC.js → chunk-FGRJZVXD.js} +3 -3
  90. package/dist/cli-bundle/chunks/{chunk-HLC3KTLP.js → chunk-FO2TYSQZ.js} +2 -2
  91. package/dist/cli-bundle/chunks/{chunk-3A2CMEM7.js → chunk-HOA3GMB6.js} +4 -4
  92. package/dist/cli-bundle/chunks/{chunk-HMMMWBK2.js → chunk-HP35AVFS.js} +2 -2
  93. package/dist/cli-bundle/chunks/{chunk-AVJD6VTA.js → chunk-J4DKAGTM.js} +3 -3
  94. package/dist/cli-bundle/chunks/{chunk-YO3THIJF.js → chunk-JS47EKLP.js} +7 -7
  95. package/dist/cli-bundle/chunks/{chunk-2IXCHCLM.js → chunk-K62SNVVE.js} +2 -2
  96. package/dist/cli-bundle/chunks/{chunk-IMCJBN2Q.js → chunk-KBKJVXUS.js} +19 -7
  97. package/dist/cli-bundle/chunks/chunk-KBKJVXUS.js.map +7 -0
  98. package/dist/cli-bundle/chunks/{chunk-CLD3XNCH.js → chunk-KCGMABHM.js} +14 -12
  99. package/dist/cli-bundle/chunks/chunk-KCGMABHM.js.map +1 -0
  100. package/dist/cli-bundle/chunks/{chunk-H7EO3QA3.js → chunk-KN4WSESY.js} +5 -5
  101. package/dist/cli-bundle/chunks/{chunk-C5W2UH56.js → chunk-KP4KIUQT.js} +3 -3
  102. package/dist/cli-bundle/chunks/{chunk-YPH4ESA2.js → chunk-KS2U7BZ3.js} +11 -6
  103. package/dist/cli-bundle/chunks/chunk-KS2U7BZ3.js.map +1 -0
  104. package/dist/cli-bundle/chunks/{chunk-GPXQBR3H.js → chunk-KVXIQDJG.js} +12 -12
  105. package/dist/cli-bundle/chunks/{chunk-NQL32HQ5.js → chunk-L3LYL3ID.js} +12 -12
  106. package/dist/cli-bundle/chunks/{chunk-WCQZBDDH.js → chunk-M7UBTVFT.js} +3 -3
  107. package/dist/cli-bundle/chunks/{chunk-3EOBJOF4.js → chunk-MSH23UWO.js} +4 -4
  108. package/dist/cli-bundle/chunks/{chunk-UAQOQ7IE.js → chunk-N4SQZ7L3.js} +2 -2
  109. package/dist/cli-bundle/chunks/{chunk-FY6Z3FYY.js → chunk-NDSMKB2I.js} +3 -3
  110. package/dist/cli-bundle/chunks/{chunk-2IF7WLB7.js → chunk-NGEEXR2R.js} +2 -2
  111. package/dist/cli-bundle/chunks/{chunk-UIIQC5YO.js → chunk-NLVCMVC7.js} +2 -2
  112. package/dist/cli-bundle/chunks/{chunk-LQHBENVW.js → chunk-NUKHZZNM.js} +3 -3
  113. package/dist/cli-bundle/chunks/{chunk-YBZW2QQ7.js → chunk-ODN53S6H.js} +6 -6
  114. package/dist/cli-bundle/chunks/{chunk-LXO6V66E.js → chunk-OTY2YEH5.js} +12 -12
  115. package/dist/cli-bundle/chunks/{chunk-6RZXO5M2.js → chunk-OVSSE2JP.js} +8 -8
  116. package/dist/cli-bundle/chunks/{chunk-4GHZR3BA.js → chunk-PQDH3S54.js} +10 -14
  117. package/dist/cli-bundle/chunks/chunk-PQDH3S54.js.map +1 -0
  118. package/dist/cli-bundle/chunks/{chunk-R3V3YCMH.js → chunk-QF4OPBAG.js} +9 -9
  119. package/dist/cli-bundle/chunks/{chunk-FHHBD7PN.js → chunk-QFVASU44.js} +2 -2
  120. package/dist/cli-bundle/chunks/{chunk-SQPKRA54.js → chunk-QQPZYP73.js} +12 -12
  121. package/dist/cli-bundle/chunks/{chunk-5AXMRKN5.js → chunk-QWNUDGFQ.js} +8 -8
  122. package/dist/cli-bundle/chunks/{chunk-TYJJOTUA.js → chunk-R4XIE7NQ.js} +54 -8
  123. package/dist/cli-bundle/chunks/chunk-R4XIE7NQ.js.map +1 -0
  124. package/dist/cli-bundle/chunks/{chunk-O7HSSFCC.js → chunk-RISLL7XH.js} +10 -5
  125. package/dist/cli-bundle/chunks/{chunk-O7HSSFCC.js.map → chunk-RISLL7XH.js.map} +2 -2
  126. package/dist/cli-bundle/chunks/{chunk-6J4K6JLA.js → chunk-SDLEYY6A.js} +3 -3
  127. package/dist/cli-bundle/chunks/{chunk-TINUJMWN.js → chunk-SM3RMWGO.js} +109 -10
  128. package/dist/cli-bundle/chunks/chunk-SM3RMWGO.js.map +1 -0
  129. package/dist/cli-bundle/chunks/{chunk-MOYM2C3J.js → chunk-TBLBEOEX.js} +9 -9
  130. package/dist/cli-bundle/chunks/{chunk-WR5567FH.js → chunk-TXKENAQP.js} +5 -4
  131. package/dist/cli-bundle/chunks/chunk-TXKENAQP.js.map +7 -0
  132. package/dist/cli-bundle/chunks/{chunk-TNPBPNII.js → chunk-UEXNNF3K.js} +7 -7
  133. package/dist/cli-bundle/chunks/{chunk-RVPTZKBC.js → chunk-UMMJAJB2.js} +9 -9
  134. package/dist/cli-bundle/chunks/{chunk-THDEID2Z.js → chunk-URJEZOLB.js} +2 -2
  135. package/dist/cli-bundle/chunks/{chunk-M2PW7EZU.js → chunk-VXBUXLVD.js} +7 -7
  136. package/dist/cli-bundle/chunks/chunk-VXBUXLVD.js.map +7 -0
  137. package/dist/cli-bundle/chunks/{chunk-UYQ7HXH4.js → chunk-XEKZCBCS.js} +3 -3
  138. package/dist/cli-bundle/chunks/{chunk-2OJHLWBZ.js → chunk-XLSQ3QLT.js} +2 -2
  139. package/dist/cli-bundle/chunks/{chunk-X7UHMKPE.js → chunk-XNGMIVQY.js} +3 -3
  140. package/dist/cli-bundle/chunks/{chunk-B2KZGPM2.js → chunk-XZS4MV37.js} +2 -2
  141. package/dist/cli-bundle/chunks/{chunk-GNIUOLZ2.js → chunk-YEFOCDIK.js} +7 -7
  142. package/dist/cli-bundle/chunks/{chunk-X4IZKYHP.js → chunk-YJAKN2N2.js} +46 -10
  143. package/dist/cli-bundle/chunks/chunk-YJAKN2N2.js.map +1 -0
  144. package/dist/cli-bundle/chunks/{chunk-GUZBNB3G.js → chunk-Z2HXAFFH.js} +2 -2
  145. package/dist/cli-bundle/chunks/{chunk-CKLBZHS7.js → chunk-Z55JACL2.js} +53 -7
  146. package/dist/cli-bundle/chunks/chunk-Z55JACL2.js.map +7 -0
  147. package/dist/cli-bundle/chunks/{claim-KW743OSW.js → claim-NHBIIBOW.js} +10 -10
  148. package/dist/cli-bundle/chunks/{claim-BJ4QMPJC.js → claim-RNEBQCOO.js} +10 -10
  149. package/dist/cli-bundle/chunks/close-UNTFXVM3.js +13 -0
  150. package/dist/cli-bundle/chunks/{close-SYHSRZDC.js → close-ZMXL2WDS.js} +8 -8
  151. package/dist/cli-bundle/chunks/{close-many-LAC5VR4G.js → close-many-CDPQGQUB.js} +24 -18
  152. package/dist/cli-bundle/chunks/close-many-CDPQGQUB.js.map +1 -0
  153. package/dist/cli-bundle/chunks/{close-many-DBLEYFOY.js → close-many-IQV5C2SI.js} +23 -17
  154. package/dist/cli-bundle/chunks/close-many-IQV5C2SI.js.map +7 -0
  155. package/dist/cli-bundle/chunks/{comments-JEO6HHVM.js → comments-EFVBHWPT.js} +10 -10
  156. package/dist/cli-bundle/chunks/{comments-YT2PQ5DD.js → comments-J5Q4IJPH.js} +10 -10
  157. package/dist/cli-bundle/chunks/{config-RZRVS3ZV.js → config-72253M2O.js} +10 -11
  158. package/dist/cli-bundle/chunks/config-72253M2O.js.map +1 -0
  159. package/dist/cli-bundle/chunks/{config-YJSAAADD.js → config-VFYA6BMI.js} +9 -10
  160. package/dist/cli-bundle/chunks/config-VFYA6BMI.js.map +7 -0
  161. package/dist/cli-bundle/chunks/{context-LGYEEKAW.js → context-AVLO4IFH.js} +13 -13
  162. package/dist/cli-bundle/chunks/{context-ZUH5IOOI.js → context-WMSI2D65.js} +13 -13
  163. package/dist/cli-bundle/chunks/{contracts-YXJ6NXKH.js → contracts-D4BN3VSQ.js} +4 -4
  164. package/dist/cli-bundle/chunks/{contracts-ZIBXROPE.js → contracts-RGPOBLPL.js} +4 -4
  165. package/dist/cli-bundle/chunks/{copy-YPWEIAPD.js → copy-H6TXHK7S.js} +7 -7
  166. package/dist/cli-bundle/chunks/{copy-BZALX5MQ.js → copy-WXE3OOLZ.js} +7 -7
  167. package/dist/cli-bundle/chunks/create-EZWAMUKR.js +27 -0
  168. package/dist/cli-bundle/chunks/{create-CF7EVRX7.js → create-PUAIJEZ7.js} +13 -13
  169. package/dist/cli-bundle/chunks/{delete-KR4VBWVE.js → delete-PKR2JHLH.js} +7 -7
  170. package/dist/cli-bundle/chunks/{delete-XLZRTRKR.js → delete-WBME6WG5.js} +7 -7
  171. package/dist/cli-bundle/chunks/{deps-2YTXD3VM.js → deps-4BQEDV4L.js} +7 -7
  172. package/dist/cli-bundle/chunks/{deps-GZMFMTGS.js → deps-KWHQRO75.js} +7 -7
  173. package/dist/cli-bundle/chunks/{docs-SLROFEQ4.js → docs-364GT3ZR.js} +9 -9
  174. package/dist/cli-bundle/chunks/{docs-ZHISRR2D.js → docs-SCNBUGSV.js} +9 -9
  175. package/dist/cli-bundle/chunks/{extension-XYCUXICD.js → extension-CRE7JM47.js} +5 -5
  176. package/dist/cli-bundle/chunks/{extension-3C7OOI4F.js → extension-KK2UPXJD.js} +5 -5
  177. package/dist/cli-bundle/chunks/{files-FUWF2FYJ.js → files-3GESQAWL.js} +9 -9
  178. package/dist/cli-bundle/chunks/{files-J4I5IU4O.js → files-66EHM5ZR.js} +9 -9
  179. package/dist/cli-bundle/chunks/{gc-34NXSNSN.js → gc-D5IWOKQH.js} +13 -5
  180. package/dist/cli-bundle/chunks/gc-D5IWOKQH.js.map +1 -0
  181. package/dist/cli-bundle/chunks/{gc-SPIIZX3A.js → gc-MOQDND5J.js} +12 -4
  182. package/dist/cli-bundle/chunks/gc-MOQDND5J.js.map +7 -0
  183. package/dist/cli-bundle/chunks/{get-SZKNRHMA.js → get-7J2ZCBV5.js} +11 -11
  184. package/dist/cli-bundle/chunks/{get-VITKYP6S.js → get-WXSLXV3K.js} +11 -11
  185. package/dist/cli-bundle/chunks/{health-7G3EPM57.js → health-B6AEM7BV.js} +21 -14
  186. package/dist/cli-bundle/chunks/health-B6AEM7BV.js.map +1 -0
  187. package/dist/cli-bundle/chunks/{health-4SNTA2TF.js → health-YMZGOMVX.js} +20 -13
  188. package/dist/cli-bundle/chunks/health-YMZGOMVX.js.map +7 -0
  189. package/dist/cli-bundle/chunks/{history-SDAWYZR3.js → history-TJTO5GCR.js} +10 -10
  190. package/dist/cli-bundle/chunks/history-ZERISU2L.js +20 -0
  191. package/dist/cli-bundle/chunks/{history-compact-POTZGG7K.js → history-compact-CKNN6UKW.js} +11 -11
  192. package/dist/cli-bundle/chunks/{history-compact-DMW536VH.js → history-compact-N2Q7IR3T.js} +11 -11
  193. package/dist/cli-bundle/chunks/history-redact-GODBYT5A.js +19 -0
  194. package/dist/cli-bundle/chunks/{history-redact-EPJ7GENL.js → history-redact-JUXUOH54.js} +11 -11
  195. package/dist/cli-bundle/chunks/{history-repair-YNESJRT6.js → history-repair-CCCPBNTF.js} +11 -11
  196. package/dist/cli-bundle/chunks/{history-repair-IJ7LLBET.js → history-repair-TDBBSRVK.js} +11 -11
  197. package/dist/cli-bundle/chunks/{init-YHVBTEET.js → init-6ZPKD3YN.js} +9 -9
  198. package/dist/cli-bundle/chunks/init-CBZHXBR3.js +17 -0
  199. package/dist/cli-bundle/chunks/{learnings-T4PF24YN.js → learnings-U7U2FNIO.js} +10 -10
  200. package/dist/cli-bundle/chunks/{learnings-4YBMIVCZ.js → learnings-WYNTYQ5T.js} +10 -10
  201. package/dist/cli-bundle/chunks/list-7MTPPZHC.js +20 -0
  202. package/dist/cli-bundle/chunks/{list-3KEVBOYW.js → list-JGP7ODML.js} +10 -10
  203. package/dist/cli-bundle/chunks/{notes-GJKALVZM.js → notes-P25YVTEG.js} +10 -10
  204. package/dist/cli-bundle/chunks/{notes-FLUCNJSH.js → notes-QIF6A7XS.js} +10 -10
  205. package/dist/cli-bundle/chunks/{plan-YYMIL3HV.js → plan-RACB5PI6.js} +13 -13
  206. package/dist/cli-bundle/chunks/{plan-T5MMZLI3.js → plan-SSBJFWXA.js} +13 -13
  207. package/dist/cli-bundle/chunks/{register-list-query-I65EZ3HB.js → register-list-query-5IXDPUZ6.js} +23 -21
  208. package/dist/cli-bundle/chunks/register-list-query-5IXDPUZ6.js.map +1 -0
  209. package/dist/cli-bundle/chunks/{register-list-query-OECMHO4G.js → register-list-query-GQAEIG4K.js} +22 -20
  210. package/dist/cli-bundle/chunks/register-list-query-GQAEIG4K.js.map +7 -0
  211. package/dist/cli-bundle/chunks/{register-mutation-2FLXORLR.js → register-mutation-FAS4YG63.js} +41 -37
  212. package/dist/cli-bundle/chunks/{register-mutation-2FLXORLR.js.map → register-mutation-FAS4YG63.js.map} +1 -1
  213. package/dist/cli-bundle/chunks/{register-mutation-5GPDEKHR.js → register-mutation-YZCUILGO.js} +40 -36
  214. package/dist/cli-bundle/chunks/{register-mutation-5GPDEKHR.js.map → register-mutation-YZCUILGO.js.map} +2 -2
  215. package/dist/cli-bundle/chunks/{register-operations-GQKT35H5.js → register-operations-IBYWNJN5.js} +30 -30
  216. package/dist/cli-bundle/chunks/{register-operations-BNGAUMGK.js → register-operations-S2BOLUPF.js} +30 -30
  217. package/dist/cli-bundle/chunks/{register-setup-EJY44FPH.js → register-setup-ABA2JPWO.js} +19 -18
  218. package/dist/cli-bundle/chunks/{register-setup-EJY44FPH.js.map → register-setup-ABA2JPWO.js.map} +2 -2
  219. package/dist/cli-bundle/chunks/{register-setup-DNDCGZ4O.js → register-setup-JRZ4UMWZ.js} +20 -19
  220. package/dist/cli-bundle/chunks/register-setup-JRZ4UMWZ.js.map +1 -0
  221. package/dist/cli-bundle/chunks/restore-3JRX27QW.js +17 -0
  222. package/dist/cli-bundle/chunks/{restore-DDJGVZIN.js → restore-K72ZNPEP.js} +11 -11
  223. package/dist/cli-bundle/chunks/{schema-B7NQ6XVP.js → schema-3VKRDBLC.js} +76 -20
  224. package/dist/cli-bundle/chunks/schema-3VKRDBLC.js.map +7 -0
  225. package/dist/cli-bundle/chunks/{schema-HEGYH6CE.js → schema-UL4B2JX5.js} +77 -21
  226. package/dist/cli-bundle/chunks/schema-UL4B2JX5.js.map +1 -0
  227. package/dist/cli-bundle/chunks/{search-JNEZJV7H.js → search-632WJ7GO.js} +103 -14
  228. package/dist/cli-bundle/chunks/search-632WJ7GO.js.map +7 -0
  229. package/dist/cli-bundle/chunks/{search-DVVQ4UO2.js → search-EQDHSE4G.js} +104 -15
  230. package/dist/cli-bundle/chunks/search-EQDHSE4G.js.map +1 -0
  231. package/dist/cli-bundle/chunks/{stats-SYTJRR4Z.js → stats-O4UTMJMC.js} +7 -7
  232. package/dist/cli-bundle/chunks/{stats-7JDIJRDH.js → stats-WLJ3XBF5.js} +7 -7
  233. package/dist/cli-bundle/chunks/{telemetry-4HHWD5Y7.js → telemetry-EUVHFSQU.js} +4 -4
  234. package/dist/cli-bundle/chunks/{telemetry-EGWP7ZUX.js → telemetry-NRVWX25E.js} +4 -4
  235. package/dist/cli-bundle/chunks/{test-IIELLSZX.js → test-GXUBQNUC.js} +14 -14
  236. package/dist/cli-bundle/chunks/test-XN7RJL5Z.js +32 -0
  237. package/dist/cli-bundle/chunks/{test-all-IHTUJRRC.js → test-all-UTFXC7S2.js} +14 -14
  238. package/dist/cli-bundle/chunks/{test-all-7DNCMML7.js → test-all-XM6OKI3L.js} +14 -14
  239. package/dist/cli-bundle/chunks/{test-runs-5FEMBV3A.js → test-runs-7FHCPEA3.js} +5 -5
  240. package/dist/cli-bundle/chunks/{test-runs-RNKZ37PS.js → test-runs-IK6E2HNX.js} +5 -5
  241. package/dist/cli-bundle/chunks/update-LFBSEW3N.js +21 -0
  242. package/dist/cli-bundle/chunks/update-U4B4OMHZ.js +25 -0
  243. package/dist/cli-bundle/chunks/{update-many-BSZZZYXY.js → update-many-5KD33MKY.js} +22 -22
  244. package/dist/cli-bundle/chunks/{update-many-BWKJJEBF.js → update-many-N3YTM7K4.js} +22 -22
  245. package/dist/cli-bundle/chunks/{upgrade-YWI5DJFA.js → upgrade-5SRFLUNW.js} +8 -15
  246. package/dist/cli-bundle/chunks/upgrade-5SRFLUNW.js.map +7 -0
  247. package/dist/cli-bundle/chunks/{upgrade-RSE5PC44.js → upgrade-FFXGO43H.js} +9 -16
  248. package/dist/cli-bundle/chunks/upgrade-FFXGO43H.js.map +1 -0
  249. package/dist/cli-bundle/chunks/{validate-UCEOB7S6.js → validate-CRWXZILW.js} +16 -16
  250. package/dist/cli-bundle/chunks/{validate-NK3WKB7C.js → validate-T3LPWSZG.js} +16 -16
  251. package/dist/cli-bundle/main.js +51 -62
  252. package/dist/cli-bundle/main.js.map +3 -3
  253. package/dist/core/config/nested-settings.d.ts +0 -2
  254. package/dist/core/config/nested-settings.js +2 -4
  255. package/dist/core/config/nested-settings.js.map +1 -1
  256. package/dist/core/diagnostics/remediation.js +7 -2
  257. package/dist/core/diagnostics/remediation.js.map +1 -1
  258. package/dist/core/fs/fs-utils.js +29 -4
  259. package/dist/core/fs/fs-utils.js.map +1 -1
  260. package/dist/core/packages/root.d.ts +10 -0
  261. package/dist/core/packages/root.js +24 -2
  262. package/dist/core/packages/root.js.map +1 -1
  263. package/dist/core/schema/runtime-schema.js +3 -6
  264. package/dist/core/schema/runtime-schema.js.map +1 -1
  265. package/dist/core/search/background-refresh.d.ts +0 -8
  266. package/dist/core/search/background-refresh.js +2 -9
  267. package/dist/core/search/background-refresh.js.map +1 -1
  268. package/dist/core/search/vector-stores.js +6 -8
  269. package/dist/core/search/vector-stores.js.map +1 -1
  270. package/dist/core/sentry/instrument.js +4 -17
  271. package/dist/core/sentry/instrument.js.map +1 -1
  272. package/dist/core/store/paths.js +17 -3
  273. package/dist/core/store/paths.js.map +1 -1
  274. package/dist/core/telemetry/runtime.d.ts +1 -0
  275. package/dist/core/telemetry/runtime.js +3 -3
  276. package/dist/core/telemetry/runtime.js.map +1 -1
  277. package/dist/mcp/server.js +76 -13
  278. package/dist/mcp/server.js.map +1 -1
  279. package/dist/sdk/cli-contracts/commander-types.js +4 -4
  280. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  281. package/dist/sdk/cli-contracts/tool-parameter-tables.js +3 -3
  282. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  283. package/dist/sdk/cli-contracts.js +10 -8
  284. package/dist/sdk/cli-contracts.js.map +1 -1
  285. package/docs/AGENT_GUIDE.md +3 -1
  286. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  287. package/docs/COMMANDS.md +6 -4
  288. package/docs/CONFIGURATION.md +6 -0
  289. package/docs/EXTENSIONS.md +0 -5
  290. package/docs/RELEASING.md +17 -0
  291. package/marketplace.json +1 -1
  292. package/package.json +1 -1
  293. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  294. package/plugins/pm-claude/README.md +3 -3
  295. package/plugins/pm-claude/commands/pm-init.md +1 -1
  296. package/dist/cli-bundle/chunks/activity-5UROHJ3D.js +0 -16
  297. package/dist/cli-bundle/chunks/chunk-42LOFGJS.js.map +0 -7
  298. package/dist/cli-bundle/chunks/chunk-4GHZR3BA.js.map +0 -1
  299. package/dist/cli-bundle/chunks/chunk-CKLBZHS7.js.map +0 -7
  300. package/dist/cli-bundle/chunks/chunk-CLD3XNCH.js.map +0 -1
  301. package/dist/cli-bundle/chunks/chunk-IMCJBN2Q.js.map +0 -7
  302. package/dist/cli-bundle/chunks/chunk-M2PW7EZU.js.map +0 -7
  303. package/dist/cli-bundle/chunks/chunk-MWRS7Z4P.js.map +0 -7
  304. package/dist/cli-bundle/chunks/chunk-NHR2QXXZ.js.map +0 -1
  305. package/dist/cli-bundle/chunks/chunk-QQL5QSTZ.js.map +0 -1
  306. package/dist/cli-bundle/chunks/chunk-TINUJMWN.js.map +0 -1
  307. package/dist/cli-bundle/chunks/chunk-TYJJOTUA.js.map +0 -1
  308. package/dist/cli-bundle/chunks/chunk-UJUT6AHZ.js.map +0 -7
  309. package/dist/cli-bundle/chunks/chunk-WAA7UI6M.js.map +0 -7
  310. package/dist/cli-bundle/chunks/chunk-WR5567FH.js.map +0 -7
  311. package/dist/cli-bundle/chunks/chunk-X4IZKYHP.js.map +0 -1
  312. package/dist/cli-bundle/chunks/chunk-XS3O2TFJ.js.map +0 -1
  313. package/dist/cli-bundle/chunks/chunk-YPH4ESA2.js.map +0 -1
  314. package/dist/cli-bundle/chunks/close-P4ZBKODL.js +0 -13
  315. package/dist/cli-bundle/chunks/close-many-DBLEYFOY.js.map +0 -7
  316. package/dist/cli-bundle/chunks/close-many-LAC5VR4G.js.map +0 -1
  317. package/dist/cli-bundle/chunks/config-RZRVS3ZV.js.map +0 -1
  318. package/dist/cli-bundle/chunks/config-YJSAAADD.js.map +0 -7
  319. package/dist/cli-bundle/chunks/create-4DS2QWQC.js +0 -27
  320. package/dist/cli-bundle/chunks/gc-34NXSNSN.js.map +0 -1
  321. package/dist/cli-bundle/chunks/gc-SPIIZX3A.js.map +0 -7
  322. package/dist/cli-bundle/chunks/health-4SNTA2TF.js.map +0 -7
  323. package/dist/cli-bundle/chunks/health-7G3EPM57.js.map +0 -1
  324. package/dist/cli-bundle/chunks/history-YDUEILKP.js +0 -20
  325. package/dist/cli-bundle/chunks/history-redact-KASLLPE7.js +0 -19
  326. package/dist/cli-bundle/chunks/init-IGSS4GNH.js +0 -17
  327. package/dist/cli-bundle/chunks/list-E44O2K64.js +0 -20
  328. package/dist/cli-bundle/chunks/register-list-query-I65EZ3HB.js.map +0 -1
  329. package/dist/cli-bundle/chunks/register-list-query-OECMHO4G.js.map +0 -7
  330. package/dist/cli-bundle/chunks/register-setup-DNDCGZ4O.js.map +0 -1
  331. package/dist/cli-bundle/chunks/restore-SJSASGZP.js +0 -17
  332. package/dist/cli-bundle/chunks/schema-B7NQ6XVP.js.map +0 -7
  333. package/dist/cli-bundle/chunks/schema-HEGYH6CE.js.map +0 -1
  334. package/dist/cli-bundle/chunks/search-DVVQ4UO2.js.map +0 -1
  335. package/dist/cli-bundle/chunks/search-JNEZJV7H.js.map +0 -7
  336. package/dist/cli-bundle/chunks/test-ML5RLWXE.js +0 -32
  337. package/dist/cli-bundle/chunks/update-6C67X4KS.js +0 -21
  338. package/dist/cli-bundle/chunks/update-VF26YPT3.js +0 -25
  339. package/dist/cli-bundle/chunks/upgrade-RSE5PC44.js.map +0 -1
  340. package/dist/cli-bundle/chunks/upgrade-YWI5DJFA.js.map +0 -7
  341. /package/dist/cli-bundle/chunks/{activity-5UROHJ3D.js.map → activity-A3QKFSSF.js.map} +0 -0
  342. /package/dist/cli-bundle/chunks/{activity-YVB3QRTE.js.map → activity-Q7XMIZIH.js.map} +0 -0
  343. /package/dist/cli-bundle/chunks/{aggregate-LH66F75F.js.map → aggregate-GBSHSXOB.js.map} +0 -0
  344. /package/dist/cli-bundle/chunks/{aggregate-OHSWFQJM.js.map → aggregate-HKQJZUBG.js.map} +0 -0
  345. /package/dist/cli-bundle/chunks/{append-2PPYFAG5.js.map → append-3RFOU7P5.js.map} +0 -0
  346. /package/dist/cli-bundle/chunks/{append-AUGT5W6J.js.map → append-OM74OJVT.js.map} +0 -0
  347. /package/dist/cli-bundle/chunks/{chunk-HRMHZ4RV.js.map → chunk-2BYKYPWY.js.map} +0 -0
  348. /package/dist/cli-bundle/chunks/{chunk-TP4DDY27.js.map → chunk-2HMD3JM2.js.map} +0 -0
  349. /package/dist/cli-bundle/chunks/{chunk-4CHEG6UK.js.map → chunk-2YPVCD7T.js.map} +0 -0
  350. /package/dist/cli-bundle/chunks/{chunk-UT6WFXW2.js.map → chunk-4TI3532H.js.map} +0 -0
  351. /package/dist/cli-bundle/chunks/{chunk-KNGVP5WJ.js.map → chunk-4WYBLB6J.js.map} +0 -0
  352. /package/dist/cli-bundle/chunks/{chunk-V6EYFTRL.js.map → chunk-5NVJA7IW.js.map} +0 -0
  353. /package/dist/cli-bundle/chunks/{chunk-WYEXLDDY.js.map → chunk-AEMKH5WQ.js.map} +0 -0
  354. /package/dist/cli-bundle/chunks/{chunk-OKSKJKHX.js.map → chunk-AXBUHLW7.js.map} +0 -0
  355. /package/dist/cli-bundle/chunks/{chunk-UEWA73ZZ.js.map → chunk-BFJPMUF5.js.map} +0 -0
  356. /package/dist/cli-bundle/chunks/{chunk-B5RF3IP7.js.map → chunk-BKQMJXWY.js.map} +0 -0
  357. /package/dist/cli-bundle/chunks/{chunk-HV5SSZXF.js.map → chunk-CBJXWXI5.js.map} +0 -0
  358. /package/dist/cli-bundle/chunks/{chunk-LI65XLJR.js.map → chunk-EPWT7BEA.js.map} +0 -0
  359. /package/dist/cli-bundle/chunks/{chunk-LMTOY5HE.js.map → chunk-ETZZU5QF.js.map} +0 -0
  360. /package/dist/cli-bundle/chunks/{chunk-LIN2BPJ7.js.map → chunk-F33VC5EX.js.map} +0 -0
  361. /package/dist/cli-bundle/chunks/{chunk-SFFVGNHC.js.map → chunk-FGRJZVXD.js.map} +0 -0
  362. /package/dist/cli-bundle/chunks/{chunk-HLC3KTLP.js.map → chunk-FO2TYSQZ.js.map} +0 -0
  363. /package/dist/cli-bundle/chunks/{chunk-3A2CMEM7.js.map → chunk-HOA3GMB6.js.map} +0 -0
  364. /package/dist/cli-bundle/chunks/{chunk-HMMMWBK2.js.map → chunk-HP35AVFS.js.map} +0 -0
  365. /package/dist/cli-bundle/chunks/{chunk-AVJD6VTA.js.map → chunk-J4DKAGTM.js.map} +0 -0
  366. /package/dist/cli-bundle/chunks/{chunk-YO3THIJF.js.map → chunk-JS47EKLP.js.map} +0 -0
  367. /package/dist/cli-bundle/chunks/{chunk-2IXCHCLM.js.map → chunk-K62SNVVE.js.map} +0 -0
  368. /package/dist/cli-bundle/chunks/{chunk-H7EO3QA3.js.map → chunk-KN4WSESY.js.map} +0 -0
  369. /package/dist/cli-bundle/chunks/{chunk-C5W2UH56.js.map → chunk-KP4KIUQT.js.map} +0 -0
  370. /package/dist/cli-bundle/chunks/{chunk-GPXQBR3H.js.map → chunk-KVXIQDJG.js.map} +0 -0
  371. /package/dist/cli-bundle/chunks/{chunk-NQL32HQ5.js.map → chunk-L3LYL3ID.js.map} +0 -0
  372. /package/dist/cli-bundle/chunks/{chunk-WCQZBDDH.js.map → chunk-M7UBTVFT.js.map} +0 -0
  373. /package/dist/cli-bundle/chunks/{chunk-3EOBJOF4.js.map → chunk-MSH23UWO.js.map} +0 -0
  374. /package/dist/cli-bundle/chunks/{chunk-UAQOQ7IE.js.map → chunk-N4SQZ7L3.js.map} +0 -0
  375. /package/dist/cli-bundle/chunks/{chunk-FY6Z3FYY.js.map → chunk-NDSMKB2I.js.map} +0 -0
  376. /package/dist/cli-bundle/chunks/{chunk-2IF7WLB7.js.map → chunk-NGEEXR2R.js.map} +0 -0
  377. /package/dist/cli-bundle/chunks/{chunk-UIIQC5YO.js.map → chunk-NLVCMVC7.js.map} +0 -0
  378. /package/dist/cli-bundle/chunks/{chunk-LQHBENVW.js.map → chunk-NUKHZZNM.js.map} +0 -0
  379. /package/dist/cli-bundle/chunks/{chunk-YBZW2QQ7.js.map → chunk-ODN53S6H.js.map} +0 -0
  380. /package/dist/cli-bundle/chunks/{chunk-LXO6V66E.js.map → chunk-OTY2YEH5.js.map} +0 -0
  381. /package/dist/cli-bundle/chunks/{chunk-6RZXO5M2.js.map → chunk-OVSSE2JP.js.map} +0 -0
  382. /package/dist/cli-bundle/chunks/{chunk-R3V3YCMH.js.map → chunk-QF4OPBAG.js.map} +0 -0
  383. /package/dist/cli-bundle/chunks/{chunk-FHHBD7PN.js.map → chunk-QFVASU44.js.map} +0 -0
  384. /package/dist/cli-bundle/chunks/{chunk-SQPKRA54.js.map → chunk-QQPZYP73.js.map} +0 -0
  385. /package/dist/cli-bundle/chunks/{chunk-5AXMRKN5.js.map → chunk-QWNUDGFQ.js.map} +0 -0
  386. /package/dist/cli-bundle/chunks/{chunk-6J4K6JLA.js.map → chunk-SDLEYY6A.js.map} +0 -0
  387. /package/dist/cli-bundle/chunks/{chunk-MOYM2C3J.js.map → chunk-TBLBEOEX.js.map} +0 -0
  388. /package/dist/cli-bundle/chunks/{chunk-TNPBPNII.js.map → chunk-UEXNNF3K.js.map} +0 -0
  389. /package/dist/cli-bundle/chunks/{chunk-RVPTZKBC.js.map → chunk-UMMJAJB2.js.map} +0 -0
  390. /package/dist/cli-bundle/chunks/{chunk-THDEID2Z.js.map → chunk-URJEZOLB.js.map} +0 -0
  391. /package/dist/cli-bundle/chunks/{chunk-UYQ7HXH4.js.map → chunk-XEKZCBCS.js.map} +0 -0
  392. /package/dist/cli-bundle/chunks/{chunk-2OJHLWBZ.js.map → chunk-XLSQ3QLT.js.map} +0 -0
  393. /package/dist/cli-bundle/chunks/{chunk-X7UHMKPE.js.map → chunk-XNGMIVQY.js.map} +0 -0
  394. /package/dist/cli-bundle/chunks/{chunk-B2KZGPM2.js.map → chunk-XZS4MV37.js.map} +0 -0
  395. /package/dist/cli-bundle/chunks/{chunk-GNIUOLZ2.js.map → chunk-YEFOCDIK.js.map} +0 -0
  396. /package/dist/cli-bundle/chunks/{chunk-GUZBNB3G.js.map → chunk-Z2HXAFFH.js.map} +0 -0
  397. /package/dist/cli-bundle/chunks/{claim-KW743OSW.js.map → claim-NHBIIBOW.js.map} +0 -0
  398. /package/dist/cli-bundle/chunks/{claim-BJ4QMPJC.js.map → claim-RNEBQCOO.js.map} +0 -0
  399. /package/dist/cli-bundle/chunks/{close-P4ZBKODL.js.map → close-UNTFXVM3.js.map} +0 -0
  400. /package/dist/cli-bundle/chunks/{close-SYHSRZDC.js.map → close-ZMXL2WDS.js.map} +0 -0
  401. /package/dist/cli-bundle/chunks/{comments-JEO6HHVM.js.map → comments-EFVBHWPT.js.map} +0 -0
  402. /package/dist/cli-bundle/chunks/{comments-YT2PQ5DD.js.map → comments-J5Q4IJPH.js.map} +0 -0
  403. /package/dist/cli-bundle/chunks/{context-LGYEEKAW.js.map → context-AVLO4IFH.js.map} +0 -0
  404. /package/dist/cli-bundle/chunks/{context-ZUH5IOOI.js.map → context-WMSI2D65.js.map} +0 -0
  405. /package/dist/cli-bundle/chunks/{contracts-YXJ6NXKH.js.map → contracts-D4BN3VSQ.js.map} +0 -0
  406. /package/dist/cli-bundle/chunks/{contracts-ZIBXROPE.js.map → contracts-RGPOBLPL.js.map} +0 -0
  407. /package/dist/cli-bundle/chunks/{copy-YPWEIAPD.js.map → copy-H6TXHK7S.js.map} +0 -0
  408. /package/dist/cli-bundle/chunks/{copy-BZALX5MQ.js.map → copy-WXE3OOLZ.js.map} +0 -0
  409. /package/dist/cli-bundle/chunks/{create-4DS2QWQC.js.map → create-EZWAMUKR.js.map} +0 -0
  410. /package/dist/cli-bundle/chunks/{create-CF7EVRX7.js.map → create-PUAIJEZ7.js.map} +0 -0
  411. /package/dist/cli-bundle/chunks/{delete-KR4VBWVE.js.map → delete-PKR2JHLH.js.map} +0 -0
  412. /package/dist/cli-bundle/chunks/{delete-XLZRTRKR.js.map → delete-WBME6WG5.js.map} +0 -0
  413. /package/dist/cli-bundle/chunks/{deps-2YTXD3VM.js.map → deps-4BQEDV4L.js.map} +0 -0
  414. /package/dist/cli-bundle/chunks/{deps-GZMFMTGS.js.map → deps-KWHQRO75.js.map} +0 -0
  415. /package/dist/cli-bundle/chunks/{docs-SLROFEQ4.js.map → docs-364GT3ZR.js.map} +0 -0
  416. /package/dist/cli-bundle/chunks/{docs-ZHISRR2D.js.map → docs-SCNBUGSV.js.map} +0 -0
  417. /package/dist/cli-bundle/chunks/{extension-XYCUXICD.js.map → extension-CRE7JM47.js.map} +0 -0
  418. /package/dist/cli-bundle/chunks/{extension-3C7OOI4F.js.map → extension-KK2UPXJD.js.map} +0 -0
  419. /package/dist/cli-bundle/chunks/{files-FUWF2FYJ.js.map → files-3GESQAWL.js.map} +0 -0
  420. /package/dist/cli-bundle/chunks/{files-J4I5IU4O.js.map → files-66EHM5ZR.js.map} +0 -0
  421. /package/dist/cli-bundle/chunks/{get-SZKNRHMA.js.map → get-7J2ZCBV5.js.map} +0 -0
  422. /package/dist/cli-bundle/chunks/{get-VITKYP6S.js.map → get-WXSLXV3K.js.map} +0 -0
  423. /package/dist/cli-bundle/chunks/{history-SDAWYZR3.js.map → history-TJTO5GCR.js.map} +0 -0
  424. /package/dist/cli-bundle/chunks/{history-YDUEILKP.js.map → history-ZERISU2L.js.map} +0 -0
  425. /package/dist/cli-bundle/chunks/{history-compact-POTZGG7K.js.map → history-compact-CKNN6UKW.js.map} +0 -0
  426. /package/dist/cli-bundle/chunks/{history-compact-DMW536VH.js.map → history-compact-N2Q7IR3T.js.map} +0 -0
  427. /package/dist/cli-bundle/chunks/{history-redact-KASLLPE7.js.map → history-redact-GODBYT5A.js.map} +0 -0
  428. /package/dist/cli-bundle/chunks/{history-redact-EPJ7GENL.js.map → history-redact-JUXUOH54.js.map} +0 -0
  429. /package/dist/cli-bundle/chunks/{history-repair-YNESJRT6.js.map → history-repair-CCCPBNTF.js.map} +0 -0
  430. /package/dist/cli-bundle/chunks/{history-repair-IJ7LLBET.js.map → history-repair-TDBBSRVK.js.map} +0 -0
  431. /package/dist/cli-bundle/chunks/{init-YHVBTEET.js.map → init-6ZPKD3YN.js.map} +0 -0
  432. /package/dist/cli-bundle/chunks/{init-IGSS4GNH.js.map → init-CBZHXBR3.js.map} +0 -0
  433. /package/dist/cli-bundle/chunks/{learnings-T4PF24YN.js.map → learnings-U7U2FNIO.js.map} +0 -0
  434. /package/dist/cli-bundle/chunks/{learnings-4YBMIVCZ.js.map → learnings-WYNTYQ5T.js.map} +0 -0
  435. /package/dist/cli-bundle/chunks/{list-E44O2K64.js.map → list-7MTPPZHC.js.map} +0 -0
  436. /package/dist/cli-bundle/chunks/{list-3KEVBOYW.js.map → list-JGP7ODML.js.map} +0 -0
  437. /package/dist/cli-bundle/chunks/{notes-GJKALVZM.js.map → notes-P25YVTEG.js.map} +0 -0
  438. /package/dist/cli-bundle/chunks/{notes-FLUCNJSH.js.map → notes-QIF6A7XS.js.map} +0 -0
  439. /package/dist/cli-bundle/chunks/{plan-YYMIL3HV.js.map → plan-RACB5PI6.js.map} +0 -0
  440. /package/dist/cli-bundle/chunks/{plan-T5MMZLI3.js.map → plan-SSBJFWXA.js.map} +0 -0
  441. /package/dist/cli-bundle/chunks/{register-operations-GQKT35H5.js.map → register-operations-IBYWNJN5.js.map} +0 -0
  442. /package/dist/cli-bundle/chunks/{register-operations-BNGAUMGK.js.map → register-operations-S2BOLUPF.js.map} +0 -0
  443. /package/dist/cli-bundle/chunks/{restore-SJSASGZP.js.map → restore-3JRX27QW.js.map} +0 -0
  444. /package/dist/cli-bundle/chunks/{restore-DDJGVZIN.js.map → restore-K72ZNPEP.js.map} +0 -0
  445. /package/dist/cli-bundle/chunks/{stats-SYTJRR4Z.js.map → stats-O4UTMJMC.js.map} +0 -0
  446. /package/dist/cli-bundle/chunks/{stats-7JDIJRDH.js.map → stats-WLJ3XBF5.js.map} +0 -0
  447. /package/dist/cli-bundle/chunks/{telemetry-4HHWD5Y7.js.map → telemetry-EUVHFSQU.js.map} +0 -0
  448. /package/dist/cli-bundle/chunks/{telemetry-EGWP7ZUX.js.map → telemetry-NRVWX25E.js.map} +0 -0
  449. /package/dist/cli-bundle/chunks/{test-IIELLSZX.js.map → test-GXUBQNUC.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{test-ML5RLWXE.js.map → test-XN7RJL5Z.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{test-all-IHTUJRRC.js.map → test-all-UTFXC7S2.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{test-all-7DNCMML7.js.map → test-all-XM6OKI3L.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{test-runs-5FEMBV3A.js.map → test-runs-7FHCPEA3.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{test-runs-RNKZ37PS.js.map → test-runs-IK6E2HNX.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{update-6C67X4KS.js.map → update-LFBSEW3N.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{update-VF26YPT3.js.map → update-U4B4OMHZ.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{update-many-BSZZZYXY.js.map → update-many-5KD33MKY.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{update-many-BWKJJEBF.js.map → update-many-N3YTM7K4.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{validate-UCEOB7S6.js.map → validate-CRWXZILW.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{validate-NK3WKB7C.js.map → validate-T3LPWSZG.js.map} +0 -0
@@ -1,7 +1,6 @@
1
1
 
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="adef1018-c477-5847-9357-11d6342b5ccf")}catch(e){}}();
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="75ce1812-4133-528d-8ef4-42a7f5a81eb3")}catch(e){}}();
3
3
  import { execFile } from "node:child_process";
4
- import fs from "node:fs/promises";
5
4
  import path from "node:path";
6
5
  import { promisify } from "node:util";
7
6
  import { readManagedExtensionState, runExtension, } from "./extension.js";
@@ -10,7 +9,7 @@ import { pathExists } from "../../core/fs/fs-utils.js";
10
9
  import { EXIT_CODE } from "../../core/shared/constants.js";
11
10
  import { PmCliError } from "../../core/shared/errors.js";
12
11
  import { resolvePmRoot } from "../../core/store/paths.js";
13
- import { resolvePmPackageRootFromModule } from "../../core/packages/root.js";
12
+ import { resolvePmCliVersion } from "../../core/packages/root.js";
14
13
  const execFileAsync = promisify(execFile);
15
14
  const DEFAULT_CLI_PACKAGE = "@unbrained/pm-cli";
16
15
  const DEFAULT_TAG = "latest";
@@ -65,14 +64,7 @@ async function defaultCommandRunner(command, args, options) {
65
64
  }
66
65
  }
67
66
  async function readCurrentVersion() {
68
- const packageJsonPath = path.join(resolvePmPackageRootFromModule(import.meta.url, ["../../.."]), "package.json");
69
- try {
70
- const parsed = JSON.parse(await fs.readFile(packageJsonPath, "utf8"));
71
- return typeof parsed.version === "string" ? parsed.version : undefined;
72
- }
73
- catch {
74
- return undefined;
75
- }
67
+ return resolvePmCliVersion(import.meta.url, ["../../.."]);
76
68
  }
77
69
  function resolveTag(options) {
78
70
  return typeof options.tag === "string" && options.tag.trim().length > 0 ? options.tag.trim() : DEFAULT_TAG;
@@ -260,4 +252,4 @@ export async function runUpgrade(target, options, global) {
260
252
  };
261
253
  }
262
254
  //# sourceMappingURL=upgrade.js.map
263
- //# debugId=adef1018-c477-5847-9357-11d6342b5ccf
255
+ //# debugId=75ce1812-4133-528d-8ef4-42a7f5a81eb3
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade.js","sources":["cli/commands/upgrade.ts"],"sourceRoot":"/","sourcesContent":["import { execFile } from \"node:child_process\";\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { promisify } from \"node:util\";\nimport {\n readManagedExtensionState,\n runExtension,\n type ExtensionScope,\n type ManagedExtensionRecord,\n type ManagedExtensionSource,\n} from \"./extension.js\";\nimport { resolveExtensionRoots } from \"../../core/extensions/loader.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { resolvePmPackageRootFromModule } from \"../../core/packages/root.js\";\n\nconst execFileAsync = promisify(execFile);\nconst DEFAULT_CLI_PACKAGE = \"@unbrained/pm-cli\";\nconst DEFAULT_TAG = \"latest\";\n\nexport interface UpgradeCommandOptions {\n dryRun?: boolean;\n cliOnly?: boolean;\n packagesOnly?: boolean;\n project?: boolean;\n local?: boolean;\n global?: boolean;\n repair?: boolean;\n tag?: string;\n packageName?: string;\n commandRunner?: UpgradeCommandRunner;\n}\n\nexport interface UpgradeCommandRunnerResult {\n stdout: string;\n stderr: string;\n}\n\nexport type UpgradeCommandRunner = (\n command: string,\n args: string[],\n options?: { cwd?: string },\n) => Promise<UpgradeCommandRunnerResult>;\n\nexport interface UpgradeCliResult {\n requested: boolean;\n status: \"planned\" | \"updated\" | \"failed\" | \"skipped\";\n package: string;\n target: string;\n command: string[];\n before_version?: string;\n after_version?: string;\n repair: boolean;\n reason?: string;\n error?: string;\n}\n\nexport interface UpgradePackageResult {\n name: string;\n directory: string;\n scope: ExtensionScope;\n source: ManagedExtensionSource;\n status: \"planned\" | \"updated\" | \"failed\" | \"skipped\";\n command: string[];\n previous_version: string;\n installed_version?: string;\n reason?: string;\n error?: string;\n}\n\nexport interface UpgradeResult {\n ok: boolean;\n action: \"upgrade\";\n dry_run: boolean;\n scope: ExtensionScope;\n target?: string;\n cli: UpgradeCliResult;\n packages: UpgradePackageResult[];\n summary: {\n requested_cli: boolean;\n requested_packages: boolean;\n planned: number;\n updated: number;\n skipped: number;\n failed: number;\n };\n}\n\nfunction resolveScope(options: UpgradeCommandOptions): ExtensionScope {\n const projectLike = options.project === true || options.local === true;\n const global = options.global === true;\n if (projectLike && global) {\n throw new PmCliError('Options \"--project/--local\" and \"--global\" are mutually exclusive.', EXIT_CODE.USAGE);\n }\n return global ? \"global\" : \"project\";\n}\n\nfunction normalizeTarget(value: string): string {\n return value.trim().toLowerCase();\n}\n\nfunction packageRecordMatchesTarget(record: ManagedExtensionRecord, target: string): boolean {\n const normalizedTarget = normalizeTarget(target);\n const values = [\n record.name,\n record.directory,\n record.source.input,\n record.source.location,\n record.source.package,\n record.source.repository,\n record.source.owner && record.source.repo ? `${record.source.owner}/${record.source.repo}` : undefined,\n ];\n return values.some((value) => typeof value === \"string\" && normalizeTarget(value) === normalizedTarget);\n}\n\nfunction resolveRoots(scope: ExtensionScope, global: GlobalOptions): {\n selected_root: string;\n} {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const roots = resolveExtensionRoots(pmRoot, process.cwd());\n return {\n selected_root: scope === \"global\" ? roots.global : roots.project,\n };\n}\n\nasync function defaultCommandRunner(\n command: string,\n args: string[],\n options?: { cwd?: string },\n): Promise<UpgradeCommandRunnerResult> {\n try {\n const result = await execFileAsync(command, args, {\n cwd: options?.cwd,\n encoding: \"utf8\",\n });\n return {\n stdout: result.stdout ?? \"\",\n stderr: result.stderr ?? \"\",\n };\n } catch (error: unknown) {\n const stderr = typeof error === \"object\" && error !== null && \"stderr\" in error\n ? String((error as { stderr?: unknown }).stderr ?? \"\")\n : \"\";\n const message = stderr.trim().length > 0 ? stderr.trim() : error instanceof Error ? error.message : String(error);\n throw new PmCliError(`Command failed: ${command} ${args.join(\" \")}\\n${message}`, EXIT_CODE.GENERIC_FAILURE);\n }\n}\n\nasync function readCurrentVersion(): Promise<string | undefined> {\n const packageJsonPath = path.join(resolvePmPackageRootFromModule(import.meta.url, [\"../../..\"]), \"package.json\");\n try {\n const parsed = JSON.parse(await fs.readFile(packageJsonPath, \"utf8\")) as { version?: unknown };\n return typeof parsed.version === \"string\" ? parsed.version : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction resolveTag(options: UpgradeCommandOptions): string {\n return typeof options.tag === \"string\" && options.tag.trim().length > 0 ? options.tag.trim() : DEFAULT_TAG;\n}\n\nfunction resolveCliPackage(options: UpgradeCommandOptions): string {\n return typeof options.packageName === \"string\" && options.packageName.trim().length > 0\n ? options.packageName.trim()\n : DEFAULT_CLI_PACKAGE;\n}\n\nasync function upgradeCli(options: UpgradeCommandOptions, dryRun: boolean): Promise<UpgradeCliResult> {\n const runner = options.commandRunner ?? defaultCommandRunner;\n const packageName = resolveCliPackage(options);\n const tag = resolveTag(options);\n const target = `${packageName}@${tag}`;\n const command = [\"npm\", \"install\", \"-g\", target];\n if (options.repair === true) {\n command.push(\"--force\");\n }\n const beforeVersion = await readCurrentVersion();\n const planned: UpgradeCliResult = {\n requested: true,\n status: \"planned\",\n package: packageName,\n target,\n command,\n before_version: beforeVersion,\n repair: options.repair === true,\n };\n if (dryRun) {\n return planned;\n }\n try {\n await runner(command[0]!, command.slice(1));\n const verified = await runner(\"pm\", [\"--version\"]);\n return {\n ...planned,\n status: \"updated\",\n after_version: verified.stdout.trim() || undefined,\n };\n } catch (error: unknown) {\n return {\n ...planned,\n status: \"failed\",\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\nfunction isLocalNpmSpec(spec: string): boolean {\n return path.isAbsolute(spec) || spec.startsWith(\".\") || spec.startsWith(\"..\") || spec.startsWith(\"file:\");\n}\n\nfunction resolvePackageInstallSource(source: ManagedExtensionSource, tag: string): string {\n if (source.kind === \"npm\") {\n const rawSpec = source.input.startsWith(\"npm:\") ? source.input.slice(\"npm:\".length).trim() : source.input.trim();\n if (!isLocalNpmSpec(rawSpec) && source.package && source.package.trim().length > 0) {\n return `npm:${source.package.trim()}@${tag}`;\n }\n return source.input.startsWith(\"npm:\") ? source.input : `npm:${source.input}`;\n }\n return source.input;\n}\n\nasync function resolveRunnablePackageSource(source: ManagedExtensionSource, tag: string): Promise<string> {\n const installSource = resolvePackageInstallSource(source, tag);\n if (source.kind !== \"local\") {\n return installSource;\n }\n if (await pathExists(installSource)) {\n return installSource;\n }\n if (await pathExists(source.location)) {\n return source.location;\n }\n return installSource;\n}\n\nfunction packageCommandFor(source: ManagedExtensionSource, installSource: string, scope: ExtensionScope, ref?: string): string[] {\n const command = [\"pm\", \"install\", installSource, scope === \"global\" ? \"--global\" : \"--project\"];\n if (source.kind === \"github\" && ref && ref.trim().length > 0) {\n command.push(\"--ref\", ref.trim());\n }\n return command;\n}\n\nasync function readManagedRecords(scope: ExtensionScope, global: GlobalOptions): Promise<ManagedExtensionRecord[]> {\n const roots = resolveRoots(scope, global);\n const managedState = await readManagedExtensionState(roots.selected_root);\n return managedState.state.entries.filter((entry) => entry.scope === scope);\n}\n\nasync function refreshManagedRecord(\n scope: ExtensionScope,\n global: GlobalOptions,\n record: ManagedExtensionRecord,\n): Promise<ManagedExtensionRecord | undefined> {\n const records = await readManagedRecords(scope, global);\n return records.find((candidate) => packageRecordMatchesTarget(candidate, record.name)) ??\n records.find((candidate) => normalizeTarget(candidate.directory) === normalizeTarget(record.directory));\n}\n\nasync function upgradePackageRecord(\n record: ManagedExtensionRecord,\n options: UpgradeCommandOptions,\n global: GlobalOptions,\n scope: ExtensionScope,\n dryRun: boolean,\n): Promise<UpgradePackageResult> {\n const tag = resolveTag(options);\n const installSource = await resolveRunnablePackageSource(record.source, tag);\n const command = packageCommandFor(record.source, installSource, scope, record.source.ref);\n const planned: UpgradePackageResult = {\n name: record.name,\n directory: record.directory,\n scope,\n source: record.source,\n status: \"planned\",\n command,\n previous_version: record.manifest_version,\n };\n if (dryRun) {\n return planned;\n }\n try {\n await runExtension(\n installSource,\n {\n install: true,\n project: scope === \"project\",\n global: scope === \"global\",\n ref: record.source.kind === \"github\" ? record.source.ref : undefined,\n },\n global,\n );\n const refreshed = await refreshManagedRecord(scope, global, record);\n return {\n ...planned,\n status: \"updated\",\n installed_version: refreshed?.manifest_version,\n };\n } catch (error: unknown) {\n return {\n ...planned,\n status: \"failed\",\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\nfunction summarize(\n cli: UpgradeCliResult,\n packages: UpgradePackageResult[],\n includeCli: boolean,\n includePackages: boolean,\n): UpgradeResult[\"summary\"] {\n const statuses = [includeCli ? cli.status : undefined, ...packages.map((entry) => entry.status)].filter(\n (value): value is UpgradeCliResult[\"status\"] => typeof value === \"string\",\n );\n return {\n requested_cli: includeCli,\n requested_packages: includePackages,\n planned: statuses.filter((status) => status === \"planned\").length,\n updated: statuses.filter((status) => status === \"updated\").length,\n skipped: statuses.filter((status) => status === \"skipped\").length,\n failed: statuses.filter((status) => status === \"failed\").length,\n };\n}\n\nexport async function runUpgrade(\n target: string | undefined,\n options: UpgradeCommandOptions,\n global: GlobalOptions,\n): Promise<UpgradeResult> {\n if (options.cliOnly === true && options.packagesOnly === true) {\n throw new PmCliError('Options \"--cli-only\" and \"--packages-only\" are mutually exclusive.', EXIT_CODE.USAGE);\n }\n\n const scope = resolveScope(options);\n const dryRun = options.dryRun === true;\n const normalizedTarget = typeof target === \"string\" && target.trim().length > 0 ? target.trim() : undefined;\n if (options.cliOnly === true && normalizedTarget) {\n throw new PmCliError('A package target cannot be used with \"--cli-only\".', EXIT_CODE.USAGE);\n }\n const includeCli = options.packagesOnly === true || normalizedTarget ? false : true;\n const includePackages = options.cliOnly === true ? false : true;\n const cli = includeCli\n ? await upgradeCli(options, dryRun)\n : {\n requested: false,\n status: \"skipped\",\n package: resolveCliPackage(options),\n target: `${resolveCliPackage(options)}@${resolveTag(options)}`,\n command: [\"npm\", \"install\", \"-g\", `${resolveCliPackage(options)}@${resolveTag(options)}`],\n repair: options.repair === true,\n reason: \"not_requested\",\n } as UpgradeCliResult;\n\n let packageRecords = includePackages ? await readManagedRecords(scope, global) : [];\n if (normalizedTarget) {\n packageRecords = packageRecords.filter((entry) => packageRecordMatchesTarget(entry, normalizedTarget));\n if (packageRecords.length === 0) {\n throw new PmCliError(`Managed package \"${normalizedTarget}\" was not found in ${scope} scope.`, EXIT_CODE.NOT_FOUND);\n }\n }\n\n const packages: UpgradePackageResult[] = [];\n for (const record of packageRecords) {\n packages.push(await upgradePackageRecord(record, options, global, scope, dryRun));\n }\n\n const summary = summarize(cli, packages, includeCli, includePackages);\n return {\n ok: summary.failed === 0,\n action: \"upgrade\",\n dry_run: dryRun,\n scope,\n target: normalizedTarget,\n cli,\n packages,\n summary,\n };\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,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oBAAoB,gBAAgB,sBAAsB,KAAK,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACtH,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAA2B,EAAE,CAAC;IAC5C,KAAK,MAAM,MAAM,IAAI,cAAc,EAAE,CAAC;QACpC,QAAQ,CAAC,IAAI,CAAC,MAAM,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC;IACpF,CAAC;IAED,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;IACtE,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,MAAM,KAAK,CAAC;QACxB,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,MAAM;QACf,KAAK;QACL,MAAM,EAAE,gBAAgB;QACxB,GAAG;QACH,QAAQ;QACR,OAAO;KACR,CAAC;AACJ,CAAC","debugId":"adef1018-c477-5847-9357-11d6342b5ccf"}
1
+ {"version":3,"file":"upgrade.js","sources":["cli/commands/upgrade.ts"],"sourceRoot":"/","sourcesContent":["import { execFile } from \"node:child_process\";\nimport path from \"node:path\";\nimport { promisify } from \"node:util\";\nimport {\n readManagedExtensionState,\n runExtension,\n type ExtensionScope,\n type ManagedExtensionRecord,\n type ManagedExtensionSource,\n} from \"./extension.js\";\nimport { resolveExtensionRoots } from \"../../core/extensions/loader.js\";\nimport { pathExists } from \"../../core/fs/fs-utils.js\";\nimport type { GlobalOptions } from \"../../core/shared/command-types.js\";\nimport { EXIT_CODE } from \"../../core/shared/constants.js\";\nimport { PmCliError } from \"../../core/shared/errors.js\";\nimport { resolvePmRoot } from \"../../core/store/paths.js\";\nimport { resolvePmCliVersion } from \"../../core/packages/root.js\";\n\nconst execFileAsync = promisify(execFile);\nconst DEFAULT_CLI_PACKAGE = \"@unbrained/pm-cli\";\nconst DEFAULT_TAG = \"latest\";\n\nexport interface UpgradeCommandOptions {\n dryRun?: boolean;\n cliOnly?: boolean;\n packagesOnly?: boolean;\n project?: boolean;\n local?: boolean;\n global?: boolean;\n repair?: boolean;\n tag?: string;\n packageName?: string;\n commandRunner?: UpgradeCommandRunner;\n}\n\nexport interface UpgradeCommandRunnerResult {\n stdout: string;\n stderr: string;\n}\n\nexport type UpgradeCommandRunner = (\n command: string,\n args: string[],\n options?: { cwd?: string },\n) => Promise<UpgradeCommandRunnerResult>;\n\nexport interface UpgradeCliResult {\n requested: boolean;\n status: \"planned\" | \"updated\" | \"failed\" | \"skipped\";\n package: string;\n target: string;\n command: string[];\n before_version?: string;\n after_version?: string;\n repair: boolean;\n reason?: string;\n error?: string;\n}\n\nexport interface UpgradePackageResult {\n name: string;\n directory: string;\n scope: ExtensionScope;\n source: ManagedExtensionSource;\n status: \"planned\" | \"updated\" | \"failed\" | \"skipped\";\n command: string[];\n previous_version: string;\n installed_version?: string;\n reason?: string;\n error?: string;\n}\n\nexport interface UpgradeResult {\n ok: boolean;\n action: \"upgrade\";\n dry_run: boolean;\n scope: ExtensionScope;\n target?: string;\n cli: UpgradeCliResult;\n packages: UpgradePackageResult[];\n summary: {\n requested_cli: boolean;\n requested_packages: boolean;\n planned: number;\n updated: number;\n skipped: number;\n failed: number;\n };\n}\n\nfunction resolveScope(options: UpgradeCommandOptions): ExtensionScope {\n const projectLike = options.project === true || options.local === true;\n const global = options.global === true;\n if (projectLike && global) {\n throw new PmCliError('Options \"--project/--local\" and \"--global\" are mutually exclusive.', EXIT_CODE.USAGE);\n }\n return global ? \"global\" : \"project\";\n}\n\nfunction normalizeTarget(value: string): string {\n return value.trim().toLowerCase();\n}\n\nfunction packageRecordMatchesTarget(record: ManagedExtensionRecord, target: string): boolean {\n const normalizedTarget = normalizeTarget(target);\n const values = [\n record.name,\n record.directory,\n record.source.input,\n record.source.location,\n record.source.package,\n record.source.repository,\n record.source.owner && record.source.repo ? `${record.source.owner}/${record.source.repo}` : undefined,\n ];\n return values.some((value) => typeof value === \"string\" && normalizeTarget(value) === normalizedTarget);\n}\n\nfunction resolveRoots(scope: ExtensionScope, global: GlobalOptions): {\n selected_root: string;\n} {\n const pmRoot = resolvePmRoot(process.cwd(), global.path);\n const roots = resolveExtensionRoots(pmRoot, process.cwd());\n return {\n selected_root: scope === \"global\" ? roots.global : roots.project,\n };\n}\n\nasync function defaultCommandRunner(\n command: string,\n args: string[],\n options?: { cwd?: string },\n): Promise<UpgradeCommandRunnerResult> {\n try {\n const result = await execFileAsync(command, args, {\n cwd: options?.cwd,\n encoding: \"utf8\",\n });\n return {\n stdout: result.stdout ?? \"\",\n stderr: result.stderr ?? \"\",\n };\n } catch (error: unknown) {\n const stderr = typeof error === \"object\" && error !== null && \"stderr\" in error\n ? String((error as { stderr?: unknown }).stderr ?? \"\")\n : \"\";\n const message = stderr.trim().length > 0 ? stderr.trim() : error instanceof Error ? error.message : String(error);\n throw new PmCliError(`Command failed: ${command} ${args.join(\" \")}\\n${message}`, EXIT_CODE.GENERIC_FAILURE);\n }\n}\n\nasync function readCurrentVersion(): Promise<string | undefined> {\n return resolvePmCliVersion(import.meta.url, [\"../../..\"]);\n}\n\nfunction resolveTag(options: UpgradeCommandOptions): string {\n return typeof options.tag === \"string\" && options.tag.trim().length > 0 ? options.tag.trim() : DEFAULT_TAG;\n}\n\nfunction resolveCliPackage(options: UpgradeCommandOptions): string {\n return typeof options.packageName === \"string\" && options.packageName.trim().length > 0\n ? options.packageName.trim()\n : DEFAULT_CLI_PACKAGE;\n}\n\nasync function upgradeCli(options: UpgradeCommandOptions, dryRun: boolean): Promise<UpgradeCliResult> {\n const runner = options.commandRunner ?? defaultCommandRunner;\n const packageName = resolveCliPackage(options);\n const tag = resolveTag(options);\n const target = `${packageName}@${tag}`;\n const command = [\"npm\", \"install\", \"-g\", target];\n if (options.repair === true) {\n command.push(\"--force\");\n }\n const beforeVersion = await readCurrentVersion();\n const planned: UpgradeCliResult = {\n requested: true,\n status: \"planned\",\n package: packageName,\n target,\n command,\n before_version: beforeVersion,\n repair: options.repair === true,\n };\n if (dryRun) {\n return planned;\n }\n try {\n await runner(command[0]!, command.slice(1));\n const verified = await runner(\"pm\", [\"--version\"]);\n return {\n ...planned,\n status: \"updated\",\n after_version: verified.stdout.trim() || undefined,\n };\n } catch (error: unknown) {\n return {\n ...planned,\n status: \"failed\",\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\nfunction isLocalNpmSpec(spec: string): boolean {\n return path.isAbsolute(spec) || spec.startsWith(\".\") || spec.startsWith(\"..\") || spec.startsWith(\"file:\");\n}\n\nfunction resolvePackageInstallSource(source: ManagedExtensionSource, tag: string): string {\n if (source.kind === \"npm\") {\n const rawSpec = source.input.startsWith(\"npm:\") ? source.input.slice(\"npm:\".length).trim() : source.input.trim();\n if (!isLocalNpmSpec(rawSpec) && source.package && source.package.trim().length > 0) {\n return `npm:${source.package.trim()}@${tag}`;\n }\n return source.input.startsWith(\"npm:\") ? source.input : `npm:${source.input}`;\n }\n return source.input;\n}\n\nasync function resolveRunnablePackageSource(source: ManagedExtensionSource, tag: string): Promise<string> {\n const installSource = resolvePackageInstallSource(source, tag);\n if (source.kind !== \"local\") {\n return installSource;\n }\n if (await pathExists(installSource)) {\n return installSource;\n }\n if (await pathExists(source.location)) {\n return source.location;\n }\n return installSource;\n}\n\nfunction packageCommandFor(source: ManagedExtensionSource, installSource: string, scope: ExtensionScope, ref?: string): string[] {\n const command = [\"pm\", \"install\", installSource, scope === \"global\" ? \"--global\" : \"--project\"];\n if (source.kind === \"github\" && ref && ref.trim().length > 0) {\n command.push(\"--ref\", ref.trim());\n }\n return command;\n}\n\nasync function readManagedRecords(scope: ExtensionScope, global: GlobalOptions): Promise<ManagedExtensionRecord[]> {\n const roots = resolveRoots(scope, global);\n const managedState = await readManagedExtensionState(roots.selected_root);\n return managedState.state.entries.filter((entry) => entry.scope === scope);\n}\n\nasync function refreshManagedRecord(\n scope: ExtensionScope,\n global: GlobalOptions,\n record: ManagedExtensionRecord,\n): Promise<ManagedExtensionRecord | undefined> {\n const records = await readManagedRecords(scope, global);\n return records.find((candidate) => packageRecordMatchesTarget(candidate, record.name)) ??\n records.find((candidate) => normalizeTarget(candidate.directory) === normalizeTarget(record.directory));\n}\n\nasync function upgradePackageRecord(\n record: ManagedExtensionRecord,\n options: UpgradeCommandOptions,\n global: GlobalOptions,\n scope: ExtensionScope,\n dryRun: boolean,\n): Promise<UpgradePackageResult> {\n const tag = resolveTag(options);\n const installSource = await resolveRunnablePackageSource(record.source, tag);\n const command = packageCommandFor(record.source, installSource, scope, record.source.ref);\n const planned: UpgradePackageResult = {\n name: record.name,\n directory: record.directory,\n scope,\n source: record.source,\n status: \"planned\",\n command,\n previous_version: record.manifest_version,\n };\n if (dryRun) {\n return planned;\n }\n try {\n await runExtension(\n installSource,\n {\n install: true,\n project: scope === \"project\",\n global: scope === \"global\",\n ref: record.source.kind === \"github\" ? record.source.ref : undefined,\n },\n global,\n );\n const refreshed = await refreshManagedRecord(scope, global, record);\n return {\n ...planned,\n status: \"updated\",\n installed_version: refreshed?.manifest_version,\n };\n } catch (error: unknown) {\n return {\n ...planned,\n status: \"failed\",\n error: error instanceof Error ? error.message : String(error),\n };\n }\n}\n\nfunction summarize(\n cli: UpgradeCliResult,\n packages: UpgradePackageResult[],\n includeCli: boolean,\n includePackages: boolean,\n): UpgradeResult[\"summary\"] {\n const statuses = [includeCli ? cli.status : undefined, ...packages.map((entry) => entry.status)].filter(\n (value): value is UpgradeCliResult[\"status\"] => typeof value === \"string\",\n );\n return {\n requested_cli: includeCli,\n requested_packages: includePackages,\n planned: statuses.filter((status) => status === \"planned\").length,\n updated: statuses.filter((status) => status === \"updated\").length,\n skipped: statuses.filter((status) => status === \"skipped\").length,\n failed: statuses.filter((status) => status === \"failed\").length,\n };\n}\n\nexport async function runUpgrade(\n target: string | undefined,\n options: UpgradeCommandOptions,\n global: GlobalOptions,\n): Promise<UpgradeResult> {\n if (options.cliOnly === true && options.packagesOnly === true) {\n throw new PmCliError('Options \"--cli-only\" and \"--packages-only\" are mutually exclusive.', EXIT_CODE.USAGE);\n }\n\n const scope = resolveScope(options);\n const dryRun = options.dryRun === true;\n const normalizedTarget = typeof target === \"string\" && target.trim().length > 0 ? target.trim() : undefined;\n if (options.cliOnly === true && normalizedTarget) {\n throw new PmCliError('A package target cannot be used with \"--cli-only\".', EXIT_CODE.USAGE);\n }\n const includeCli = options.packagesOnly === true || normalizedTarget ? false : true;\n const includePackages = options.cliOnly === true ? false : true;\n const cli = includeCli\n ? await upgradeCli(options, dryRun)\n : {\n requested: false,\n status: \"skipped\",\n package: resolveCliPackage(options),\n target: `${resolveCliPackage(options)}@${resolveTag(options)}`,\n command: [\"npm\", \"install\", \"-g\", `${resolveCliPackage(options)}@${resolveTag(options)}`],\n repair: options.repair === true,\n reason: \"not_requested\",\n } as UpgradeCliResult;\n\n let packageRecords = includePackages ? await readManagedRecords(scope, global) : [];\n if (normalizedTarget) {\n packageRecords = packageRecords.filter((entry) => packageRecordMatchesTarget(entry, normalizedTarget));\n if (packageRecords.length === 0) {\n throw new PmCliError(`Managed package \"${normalizedTarget}\" was not found in ${scope} scope.`, EXIT_CODE.NOT_FOUND);\n }\n }\n\n const packages: UpgradePackageResult[] = [];\n for (const record of packageRecords) {\n packages.push(await upgradePackageRecord(record, options, global, scope, dryRun));\n }\n\n const summary = summarize(cli, packages, includeCli, includePackages);\n return {\n ok: summary.failed === 0,\n action: \"upgrade\",\n dry_run: dryRun,\n scope,\n target: normalizedTarget,\n cli,\n packages,\n summary,\n };\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACL,yBAAyB,EACzB,YAAY,GAIb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,E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75ce1812-4133-528d-8ef4-42a7f5a81eb3"}
package/dist/cli/main.js CHANGED
@@ -1,12 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2b36a331-5896-50c4-a43a-b885bd2ad354")}catch(e){}}();
4
- import fs from "node:fs";
5
- import path from "node:path";
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="aead80b1-f418-5252-a0b9-6ab1ea18d330")}catch(e){}}();
6
4
  import { Command } from "commander";
7
5
  import { activateExtensions, clearActiveExtensionHooks, createEmptyExtensionRegistrationRegistry, discoverExtensions, getActiveCommandResult, getActiveExtensionRegistrations, loadExtensions, consumeAfterCommandAffectedItems, runActiveCommandHandler, runActiveParserOverride, runActivePreflightOverride, runAfterCommandHooks, runBeforeCommandHooks, setActiveCommandResult, setActiveCommandContext, setActiveExtensionCommands, setActiveExtensionHooks, setActiveExtensionParsers, setActiveExtensionPreflight, setActiveExtensionRegistrations, setActiveExtensionRenderers, setActiveExtensionServices, } from "../core/extensions/index.js";
8
6
  import { pathExists } from "../core/fs/fs-utils.js";
9
- import { resolvePmPackageRootFromModule } from "../core/packages/root.js";
7
+ import { resolvePmCliVersion, resolvePmPackageRootFromModule } from "../core/packages/root.js";
10
8
  import { resolveItemTypeRegistry, } from "../core/item/type-registry.js";
11
9
  import { resolveRuntimeFieldRegistry, } from "../core/schema/runtime-schema.js";
12
10
  import { EXIT_CODE, resolveTelemetryErrorCategory } from "../core/shared/constants.js";
@@ -378,6 +376,7 @@ function extractCommandScopedOptions(command, commandArgs, extensionFlagDefiniti
378
376
  delete scoped.json;
379
377
  delete scoped.quiet;
380
378
  delete scoped.path;
379
+ delete scoped.pmPath;
381
380
  delete scoped.noExtensions;
382
381
  delete scoped.extensions;
383
382
  delete scoped.profile;
@@ -1191,18 +1190,7 @@ async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv)
1191
1190
  });
1192
1191
  }
1193
1192
  }
1194
- function resolveCliVersion() {
1195
- try {
1196
- const packageJsonPath = path.join(resolvePmPackageRoot(), "package.json");
1197
- const raw = fs.readFileSync(packageJsonPath, "utf8");
1198
- const parsed = JSON.parse(raw);
1199
- return typeof parsed.version === "string" ? parsed.version : "0.0.0";
1200
- }
1201
- catch {
1202
- return "0.0.0";
1203
- }
1204
- }
1205
- const CLI_VERSION = resolveCliVersion();
1193
+ const CLI_VERSION = resolvePmCliVersion(import.meta.url, ["../.."]) ?? "0.0.0";
1206
1194
  const program = new Command();
1207
1195
  program
1208
1196
  .name("pm")
@@ -1221,7 +1209,8 @@ program
1221
1209
  .option("--json", "Output JSON instead of TOON")
1222
1210
  .option("--quiet", "Suppress stdout output")
1223
1211
  .option("--no-changed-fields", "Omit the changed_fields array from mutation output (keeps changed_field_count)")
1224
- .option("--path <dir>", "Override PM path for this command")
1212
+ .option("--pm-path <dir>", "Explicit tracker storage path for this command (preferred over --path)")
1213
+ .option("--path <dir>", "Backward-compatible alias for --pm-path; this is the tracker storage path, not a workspace cwd")
1225
1214
  .option("--no-extensions", "Disable extension loading")
1226
1215
  .option("--no-pager", "Disable pager integration for help and long output")
1227
1216
  .option("--explain", "Render extended rationale and examples in help output")
@@ -1951,4 +1940,4 @@ export const _testOnly = {
1951
1940
  wrapThrownErrorForSentry,
1952
1941
  };
1953
1942
  //# sourceMappingURL=main.js.map
1954
- //# debugId=2b36a331-5896-50c4-a43a-b885bd2ad354
1943
+ //# debugId=aead80b1-f418-5252-a0b9-6ab1ea18d330