@unbrained/pm-cli 2026.6.6 → 2026.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (546) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +5 -1
  3. package/dist/cli/commander-usage.js +74 -4
  4. package/dist/cli/commander-usage.js.map +1 -1
  5. package/dist/cli/commands/aggregate.d.ts +8 -0
  6. package/dist/cli/commands/aggregate.js +84 -7
  7. package/dist/cli/commands/aggregate.js.map +1 -1
  8. package/dist/cli/commands/calendar.js +10 -3
  9. package/dist/cli/commands/calendar.js.map +1 -1
  10. package/dist/cli/commands/close-many.js +13 -10
  11. package/dist/cli/commands/close-many.js.map +1 -1
  12. package/dist/cli/commands/close.d.ts +1 -1
  13. package/dist/cli/commands/close.js +20 -10
  14. package/dist/cli/commands/close.js.map +1 -1
  15. package/dist/cli/commands/completion.js +68 -13
  16. package/dist/cli/commands/completion.js.map +1 -1
  17. package/dist/cli/commands/config.d.ts +5 -4
  18. package/dist/cli/commands/config.js +50 -2
  19. package/dist/cli/commands/config.js.map +1 -1
  20. package/dist/cli/commands/contracts.js +4 -3
  21. package/dist/cli/commands/contracts.js.map +1 -1
  22. package/dist/cli/commands/copy.d.ts +14 -0
  23. package/dist/cli/commands/copy.js +153 -0
  24. package/dist/cli/commands/copy.js.map +1 -0
  25. package/dist/cli/commands/extension/doctor.js +62 -2
  26. package/dist/cli/commands/extension/doctor.js.map +1 -1
  27. package/dist/cli/commands/extension/install-sources.d.ts +8 -0
  28. package/dist/cli/commands/extension/install-sources.js +82 -2
  29. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  30. package/dist/cli/commands/extension.d.ts +29 -0
  31. package/dist/cli/commands/extension.js +61 -2
  32. package/dist/cli/commands/extension.js.map +1 -1
  33. package/dist/cli/commands/get.d.ts +9 -0
  34. package/dist/cli/commands/get.js +23 -2
  35. package/dist/cli/commands/get.js.map +1 -1
  36. package/dist/cli/commands/history-compact.d.ts +39 -0
  37. package/dist/cli/commands/history-compact.js +262 -0
  38. package/dist/cli/commands/history-compact.js.map +1 -0
  39. package/dist/cli/commands/index.d.ts +2 -0
  40. package/dist/cli/commands/index.js +4 -2
  41. package/dist/cli/commands/index.js.map +1 -1
  42. package/dist/cli/commands/list.d.ts +2 -0
  43. package/dist/cli/commands/list.js +87 -9
  44. package/dist/cli/commands/list.js.map +1 -1
  45. package/dist/cli/commands/reindex.js +8 -4
  46. package/dist/cli/commands/reindex.js.map +1 -1
  47. package/dist/cli/commands/search.d.ts +1 -0
  48. package/dist/cli/commands/search.js +232 -35
  49. package/dist/cli/commands/search.js.map +1 -1
  50. package/dist/cli/error-guidance.js +26 -2
  51. package/dist/cli/error-guidance.js.map +1 -1
  52. package/dist/cli/extension-command-help.d.ts +1 -0
  53. package/dist/cli/extension-command-help.js +3 -2
  54. package/dist/cli/extension-command-help.js.map +1 -1
  55. package/dist/cli/help-content.js +10 -2
  56. package/dist/cli/help-content.js.map +1 -1
  57. package/dist/cli/main.d.ts +3 -0
  58. package/dist/cli/main.js +13 -21
  59. package/dist/cli/main.js.map +1 -1
  60. package/dist/cli/register-list-query.js +19 -4
  61. package/dist/cli/register-list-query.js.map +1 -1
  62. package/dist/cli/register-mutation.js +52 -17
  63. package/dist/cli/register-mutation.js.map +1 -1
  64. package/dist/cli/register-operations.js +31 -7
  65. package/dist/cli/register-operations.js.map +1 -1
  66. package/dist/cli/register-setup.js +5 -5
  67. package/dist/cli/register-setup.js.map +1 -1
  68. package/dist/cli/registration-helpers.js +21 -3
  69. package/dist/cli/registration-helpers.js.map +1 -1
  70. package/dist/cli-bundle/chunks/activity-5UROHJ3D.js +16 -0
  71. package/dist/cli-bundle/chunks/{activity-JM6DTDND.js → activity-YVB3QRTE.js} +11 -11
  72. package/dist/cli-bundle/chunks/{aggregate-VNAHUNNF.js → aggregate-LH66F75F.js} +87 -17
  73. package/dist/cli-bundle/chunks/aggregate-LH66F75F.js.map +7 -0
  74. package/dist/cli-bundle/chunks/{aggregate-GI7WSZPH.js → aggregate-OHSWFQJM.js} +88 -18
  75. package/dist/cli-bundle/chunks/aggregate-OHSWFQJM.js.map +1 -0
  76. package/dist/cli-bundle/chunks/{append-WMKRXKCE.js → append-2PPYFAG5.js} +8 -8
  77. package/dist/cli-bundle/chunks/{append-7H5N64R2.js → append-AUGT5W6J.js} +8 -8
  78. package/dist/cli-bundle/chunks/{chunk-6P6GGMOG.js → chunk-2IF7WLB7.js} +2 -2
  79. package/dist/cli-bundle/chunks/{chunk-T3LC5LKB.js → chunk-2IXCHCLM.js} +5 -6
  80. package/dist/cli-bundle/chunks/chunk-2IXCHCLM.js.map +7 -0
  81. package/dist/cli-bundle/chunks/{chunk-KAG77BY3.js → chunk-2OJHLWBZ.js} +2 -2
  82. package/dist/cli-bundle/chunks/{chunk-GXSUPCBV.js → chunk-3A2CMEM7.js} +4 -4
  83. package/dist/cli-bundle/chunks/{chunk-UM2GBHS4.js → chunk-3EOBJOF4.js} +4 -4
  84. package/dist/cli-bundle/chunks/{chunk-Q7SPNHLW.js → chunk-42LOFGJS.js} +91 -16
  85. package/dist/cli-bundle/chunks/chunk-42LOFGJS.js.map +7 -0
  86. package/dist/cli-bundle/chunks/{chunk-PRJCELV4.js → chunk-4CHEG6UK.js} +8 -8
  87. package/dist/cli-bundle/chunks/{chunk-4LL6TK5B.js → chunk-4GHZR3BA.js} +56 -28
  88. package/dist/cli-bundle/chunks/chunk-4GHZR3BA.js.map +1 -0
  89. package/dist/cli-bundle/chunks/{chunk-OZ7NSQHL.js → chunk-5AXMRKN5.js} +8 -8
  90. package/dist/cli-bundle/chunks/{chunk-GCOQW437.js → chunk-6J4K6JLA.js} +3 -3
  91. package/dist/cli-bundle/chunks/{chunk-2RSPZI5H.js → chunk-6RZXO5M2.js} +8 -8
  92. package/dist/cli-bundle/chunks/{chunk-KJ33AOCY.js → chunk-AVJD6VTA.js} +3 -3
  93. package/dist/cli-bundle/chunks/{chunk-TCD3R2PF.js → chunk-B2KZGPM2.js} +39 -8
  94. package/dist/cli-bundle/chunks/chunk-B2KZGPM2.js.map +1 -0
  95. package/dist/cli-bundle/chunks/{chunk-I6BNFU5X.js → chunk-B5RF3IP7.js} +3 -3
  96. package/dist/cli-bundle/chunks/{chunk-RZN6VURO.js → chunk-C5W2UH56.js} +3 -3
  97. package/dist/cli-bundle/chunks/{chunk-3LB74A67.js → chunk-CKLBZHS7.js} +6 -6
  98. package/dist/cli-bundle/chunks/{chunk-KWU6HG75.js → chunk-CLD3XNCH.js} +91 -10
  99. package/dist/cli-bundle/chunks/chunk-CLD3XNCH.js.map +1 -0
  100. package/dist/cli-bundle/chunks/{chunk-QO7EBBOM.js → chunk-FHHBD7PN.js} +38 -7
  101. package/dist/cli-bundle/chunks/chunk-FHHBD7PN.js.map +7 -0
  102. package/dist/cli-bundle/chunks/{chunk-3VAM3NNM.js → chunk-FY6Z3FYY.js} +3 -3
  103. package/dist/cli-bundle/chunks/{chunk-RWPSOIEE.js → chunk-GNIUOLZ2.js} +7 -7
  104. package/dist/cli-bundle/chunks/{chunk-MITFDD35.js → chunk-GPXQBR3H.js} +12 -12
  105. package/dist/cli-bundle/chunks/{chunk-2VBQ6ZXS.js → chunk-GUZBNB3G.js} +27 -5
  106. package/dist/cli-bundle/chunks/chunk-GUZBNB3G.js.map +1 -0
  107. package/dist/cli-bundle/chunks/{chunk-I2HSTRJF.js → chunk-H7EO3QA3.js} +5 -5
  108. package/dist/cli-bundle/chunks/{chunk-77GFDHGF.js → chunk-HLC3KTLP.js} +2 -2
  109. package/dist/cli-bundle/chunks/{chunk-OVQCEJPG.js → chunk-HMMMWBK2.js} +2 -2
  110. package/dist/cli-bundle/chunks/{chunk-KJE2FOS4.js → chunk-HRMHZ4RV.js} +26 -4
  111. package/dist/cli-bundle/chunks/chunk-HRMHZ4RV.js.map +7 -0
  112. package/dist/cli-bundle/chunks/{chunk-XLTD2HN3.js → chunk-HV5SSZXF.js} +2 -2
  113. package/dist/cli-bundle/chunks/{chunk-GU2ZJ2VV.js → chunk-IMCJBN2Q.js} +23 -14
  114. package/dist/cli-bundle/chunks/chunk-IMCJBN2Q.js.map +7 -0
  115. package/dist/cli-bundle/chunks/{chunk-2HVRUSQA.js → chunk-KNGVP5WJ.js} +3 -3
  116. package/dist/cli-bundle/chunks/{chunk-ECCMVXGM.js → chunk-KR6R465K.js} +304 -215
  117. package/dist/cli-bundle/chunks/chunk-KR6R465K.js.map +7 -0
  118. package/dist/cli-bundle/chunks/{chunk-3BWOVLTH.js → chunk-LI65XLJR.js} +8 -8
  119. package/dist/cli-bundle/chunks/{chunk-NUZ5HKR4.js → chunk-LIN2BPJ7.js} +2 -2
  120. package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js +112 -0
  121. package/dist/cli-bundle/chunks/chunk-LMTOY5HE.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{chunk-N7ACFE26.js → chunk-LQHBENVW.js} +3 -3
  123. package/dist/cli-bundle/chunks/{chunk-23YFZ3IG.js → chunk-LXO6V66E.js} +14 -14
  124. package/dist/cli-bundle/chunks/{chunk-PDDFYW4X.js → chunk-M2PW7EZU.js} +26 -7
  125. package/dist/cli-bundle/chunks/chunk-M2PW7EZU.js.map +7 -0
  126. package/dist/cli-bundle/chunks/{chunk-PIU6RSL3.js → chunk-MOYM2C3J.js} +9 -9
  127. package/dist/cli-bundle/chunks/{chunk-PROOHX4K.js → chunk-MWRS7Z4P.js} +94 -13
  128. package/dist/cli-bundle/chunks/chunk-MWRS7Z4P.js.map +7 -0
  129. package/dist/cli-bundle/chunks/{chunk-FRAUKRU2.js → chunk-NHR2QXXZ.js} +24 -15
  130. package/dist/cli-bundle/chunks/chunk-NHR2QXXZ.js.map +1 -0
  131. package/dist/cli-bundle/chunks/{chunk-IJGCZSIQ.js → chunk-NQL32HQ5.js} +12 -12
  132. package/dist/cli-bundle/chunks/{chunk-52MAOQ6J.js → chunk-O7HSSFCC.js} +65 -16
  133. package/dist/cli-bundle/chunks/chunk-O7HSSFCC.js.map +7 -0
  134. package/dist/cli-bundle/chunks/{chunk-6ER6DXH5.js → chunk-OKSKJKHX.js} +9 -9
  135. package/dist/cli-bundle/chunks/{chunk-IOR7LGF4.js → chunk-QQL5QSTZ.js} +88 -7
  136. package/dist/cli-bundle/chunks/chunk-QQL5QSTZ.js.map +1 -0
  137. package/dist/cli-bundle/chunks/{chunk-2VVCGBNV.js → chunk-R3V3YCMH.js} +9 -9
  138. package/dist/cli-bundle/chunks/{chunk-UBOPJT3S.js → chunk-RVPTZKBC.js} +9 -9
  139. package/dist/cli-bundle/chunks/{chunk-WKY2IBOQ.js → chunk-SFFVGNHC.js} +3 -3
  140. package/dist/cli-bundle/chunks/{chunk-WSMOSYRD.js → chunk-SQPKRA54.js} +14 -14
  141. package/dist/cli-bundle/chunks/chunk-THDEID2Z.js +115 -0
  142. package/dist/cli-bundle/chunks/chunk-THDEID2Z.js.map +7 -0
  143. package/dist/cli-bundle/chunks/{chunk-W7XABV4H.js → chunk-TINUJMWN.js} +92 -17
  144. package/dist/cli-bundle/chunks/chunk-TINUJMWN.js.map +1 -0
  145. package/dist/cli-bundle/chunks/{chunk-YL2DJGYS.js → chunk-TNPBPNII.js} +7 -7
  146. package/dist/cli-bundle/chunks/{chunk-XTGLRY2Y.js → chunk-TP4DDY27.js} +6 -6
  147. package/dist/cli-bundle/chunks/{chunk-AY43SBIN.js → chunk-TYJJOTUA.js} +6 -6
  148. package/dist/cli-bundle/chunks/{chunk-LCM63IXU.js → chunk-UAQOQ7IE.js} +2 -2
  149. package/dist/cli-bundle/chunks/{chunk-BQHUILZS.js → chunk-UEWA73ZZ.js} +5 -5
  150. package/dist/cli-bundle/chunks/{chunk-PO3GSVFV.js → chunk-UIIQC5YO.js} +2 -2
  151. package/dist/cli-bundle/chunks/{chunk-U5SXYXSY.js → chunk-UJUT6AHZ.js} +241 -35
  152. package/dist/cli-bundle/chunks/chunk-UJUT6AHZ.js.map +7 -0
  153. package/dist/cli-bundle/chunks/{chunk-HZGUAH22.js → chunk-UT6WFXW2.js} +6 -7
  154. package/dist/cli-bundle/chunks/chunk-UT6WFXW2.js.map +1 -0
  155. package/dist/cli-bundle/chunks/{chunk-LB3RUL2N.js → chunk-UYQ7HXH4.js} +10 -6
  156. package/dist/cli-bundle/chunks/chunk-UYQ7HXH4.js.map +1 -0
  157. package/dist/cli-bundle/chunks/{chunk-R6UFP2GE.js → chunk-V6EYFTRL.js} +7 -7
  158. package/dist/cli-bundle/chunks/{chunk-3FI4SEFT.js → chunk-WAA7UI6M.js} +58 -30
  159. package/dist/cli-bundle/chunks/chunk-WAA7UI6M.js.map +7 -0
  160. package/dist/cli-bundle/chunks/{chunk-AO442XLN.js → chunk-WCQZBDDH.js} +10 -6
  161. package/dist/cli-bundle/chunks/{chunk-AO442XLN.js.map → chunk-WCQZBDDH.js.map} +2 -2
  162. package/dist/cli-bundle/chunks/{chunk-SKJWX3QB.js → chunk-WR5567FH.js} +87 -6
  163. package/dist/cli-bundle/chunks/chunk-WR5567FH.js.map +7 -0
  164. package/dist/cli-bundle/chunks/{chunk-XSJCLN2R.js → chunk-WYEXLDDY.js} +3 -3
  165. package/dist/cli-bundle/chunks/{chunk-5SFCOO6B.js → chunk-X4IZKYHP.js} +234 -28
  166. package/dist/cli-bundle/chunks/chunk-X4IZKYHP.js.map +1 -0
  167. package/dist/cli-bundle/chunks/{chunk-E5FJNAZA.js → chunk-X7UHMKPE.js} +3 -3
  168. package/dist/cli-bundle/chunks/{chunk-WOPXVEZP.js → chunk-XS3O2TFJ.js} +27 -8
  169. package/dist/cli-bundle/chunks/chunk-XS3O2TFJ.js.map +1 -0
  170. package/dist/cli-bundle/chunks/{chunk-TPH5XEVD.js → chunk-XYNT7UFP.js} +303 -207
  171. package/dist/cli-bundle/chunks/chunk-XYNT7UFP.js.map +1 -0
  172. package/dist/cli-bundle/chunks/{chunk-GGYWB3Y2.js → chunk-YBZW2QQ7.js} +6 -6
  173. package/dist/cli-bundle/chunks/{chunk-ME2YH6FN.js → chunk-YO3THIJF.js} +7 -7
  174. package/dist/cli-bundle/chunks/{chunk-5FDATVEZ.js → chunk-YPH4ESA2.js} +66 -17
  175. package/dist/cli-bundle/chunks/chunk-YPH4ESA2.js.map +1 -0
  176. package/dist/cli-bundle/chunks/{claim-X2P4IB7J.js → claim-BJ4QMPJC.js} +10 -10
  177. package/dist/cli-bundle/chunks/{claim-4DBF6RVG.js → claim-KW743OSW.js} +10 -10
  178. package/dist/cli-bundle/chunks/close-P4ZBKODL.js +13 -0
  179. package/dist/cli-bundle/chunks/{close-PTYFA45H.js → close-SYHSRZDC.js} +8 -8
  180. package/dist/cli-bundle/chunks/{close-many-7CGIDPTJ.js → close-many-DBLEYFOY.js} +29 -26
  181. package/dist/cli-bundle/chunks/close-many-DBLEYFOY.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{close-many-ERFO6LHR.js → close-many-LAC5VR4G.js} +30 -27
  183. package/dist/cli-bundle/chunks/close-many-LAC5VR4G.js.map +1 -0
  184. package/dist/cli-bundle/chunks/{comments-QKBYCWKD.js → comments-JEO6HHVM.js} +10 -10
  185. package/dist/cli-bundle/chunks/{comments-OONGABK5.js → comments-YT2PQ5DD.js} +10 -10
  186. package/dist/cli-bundle/chunks/{config-6FXCQKIF.js → config-RZRVS3ZV.js} +127 -11
  187. package/dist/cli-bundle/chunks/config-RZRVS3ZV.js.map +1 -0
  188. package/dist/cli-bundle/chunks/{config-U4RZ4CQB.js → config-YJSAAADD.js} +128 -12
  189. package/dist/cli-bundle/chunks/config-YJSAAADD.js.map +7 -0
  190. package/dist/cli-bundle/chunks/{context-FYYJGFWS.js → context-LGYEEKAW.js} +14 -14
  191. package/dist/cli-bundle/chunks/{context-FYYJGFWS.js.map → context-LGYEEKAW.js.map} +2 -2
  192. package/dist/cli-bundle/chunks/{context-YMJ3Z2HQ.js → context-ZUH5IOOI.js} +15 -15
  193. package/dist/cli-bundle/chunks/context-ZUH5IOOI.js.map +1 -0
  194. package/dist/cli-bundle/chunks/{contracts-RFSPGVVJ.js → contracts-YXJ6NXKH.js} +7 -5
  195. package/dist/cli-bundle/chunks/contracts-YXJ6NXKH.js.map +7 -0
  196. package/dist/cli-bundle/chunks/{contracts-QDB6OMLQ.js → contracts-ZIBXROPE.js} +8 -6
  197. package/dist/cli-bundle/chunks/contracts-ZIBXROPE.js.map +1 -0
  198. package/dist/cli-bundle/chunks/copy-BZALX5MQ.js +182 -0
  199. package/dist/cli-bundle/chunks/copy-BZALX5MQ.js.map +1 -0
  200. package/dist/cli-bundle/chunks/copy-YPWEIAPD.js +185 -0
  201. package/dist/cli-bundle/chunks/copy-YPWEIAPD.js.map +7 -0
  202. package/dist/cli-bundle/chunks/create-4DS2QWQC.js +27 -0
  203. package/dist/cli-bundle/chunks/{create-I5L4EYYZ.js → create-CF7EVRX7.js} +13 -13
  204. package/dist/cli-bundle/chunks/{delete-7HPGI4GZ.js → delete-KR4VBWVE.js} +7 -7
  205. package/dist/cli-bundle/chunks/{delete-VXUPH5RS.js → delete-XLZRTRKR.js} +7 -7
  206. package/dist/cli-bundle/chunks/{deps-JSRRWC3Z.js → deps-2YTXD3VM.js} +7 -7
  207. package/dist/cli-bundle/chunks/{deps-SCZIFK2Z.js → deps-GZMFMTGS.js} +7 -7
  208. package/dist/cli-bundle/chunks/{docs-GJK6K4VP.js → docs-SLROFEQ4.js} +9 -9
  209. package/dist/cli-bundle/chunks/{docs-WW4N3MBM.js → docs-ZHISRR2D.js} +9 -9
  210. package/dist/cli-bundle/chunks/{extension-J7IBMFTD.js → extension-3C7OOI4F.js} +8 -6
  211. package/dist/cli-bundle/chunks/{extension-VDY2U33M.js → extension-XYCUXICD.js} +8 -6
  212. package/dist/cli-bundle/chunks/{files-ISZJGILQ.js → files-FUWF2FYJ.js} +9 -9
  213. package/dist/cli-bundle/chunks/{files-WKOD326U.js → files-J4I5IU4O.js} +9 -9
  214. package/dist/cli-bundle/chunks/{gc-JDVJ6OQ2.js → gc-34NXSNSN.js} +3 -3
  215. package/dist/cli-bundle/chunks/{gc-ULPVWMTN.js → gc-SPIIZX3A.js} +3 -3
  216. package/dist/cli-bundle/chunks/{get-RV37HT3G.js → get-SZKNRHMA.js} +34 -12
  217. package/dist/cli-bundle/chunks/get-SZKNRHMA.js.map +1 -0
  218. package/dist/cli-bundle/chunks/{get-WXU6WI5P.js → get-VITKYP6S.js} +33 -11
  219. package/dist/cli-bundle/chunks/get-VITKYP6S.js.map +7 -0
  220. package/dist/cli-bundle/chunks/{health-6L6EH4WR.js → health-4SNTA2TF.js} +12 -11
  221. package/dist/cli-bundle/chunks/{health-6L6EH4WR.js.map → health-4SNTA2TF.js.map} +1 -1
  222. package/dist/cli-bundle/chunks/{health-LOI2HHKB.js → health-7G3EPM57.js} +14 -13
  223. package/dist/cli-bundle/chunks/{health-LOI2HHKB.js.map → health-7G3EPM57.js.map} +1 -1
  224. package/dist/cli-bundle/chunks/{history-PKN67D5O.js → history-SDAWYZR3.js} +10 -10
  225. package/dist/cli-bundle/chunks/history-YDUEILKP.js +20 -0
  226. package/dist/cli-bundle/chunks/history-compact-DMW536VH.js +287 -0
  227. package/dist/cli-bundle/chunks/history-compact-DMW536VH.js.map +1 -0
  228. package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js +290 -0
  229. package/dist/cli-bundle/chunks/history-compact-POTZGG7K.js.map +7 -0
  230. package/dist/cli-bundle/chunks/{history-redact-V4FOJGS7.js → history-redact-EPJ7GENL.js} +11 -11
  231. package/dist/cli-bundle/chunks/history-redact-KASLLPE7.js +19 -0
  232. package/dist/cli-bundle/chunks/{history-repair-SDMHR7JT.js → history-repair-IJ7LLBET.js} +11 -11
  233. package/dist/cli-bundle/chunks/{history-repair-HIBCBIKK.js → history-repair-YNESJRT6.js} +11 -11
  234. package/dist/cli-bundle/chunks/init-IGSS4GNH.js +17 -0
  235. package/dist/cli-bundle/chunks/{init-P56QYWJF.js → init-YHVBTEET.js} +9 -8
  236. package/dist/cli-bundle/chunks/{learnings-GDFRG5J7.js → learnings-4YBMIVCZ.js} +10 -10
  237. package/dist/cli-bundle/chunks/{learnings-MIXSESLK.js → learnings-T4PF24YN.js} +10 -10
  238. package/dist/cli-bundle/chunks/{list-FGOWQMSM.js → list-3KEVBOYW.js} +10 -10
  239. package/dist/cli-bundle/chunks/list-E44O2K64.js +20 -0
  240. package/dist/cli-bundle/chunks/{notes-4XVSH2AZ.js → notes-FLUCNJSH.js} +10 -10
  241. package/dist/cli-bundle/chunks/{notes-5UK3GEH2.js → notes-GJKALVZM.js} +10 -10
  242. package/dist/cli-bundle/chunks/{plan-SLMODHWX.js → plan-T5MMZLI3.js} +13 -13
  243. package/dist/cli-bundle/chunks/{plan-DUMBV3QB.js → plan-YYMIL3HV.js} +13 -13
  244. package/dist/cli-bundle/chunks/{register-list-query-POCFZ5JW.js → register-list-query-I65EZ3HB.js} +29 -25
  245. package/dist/cli-bundle/chunks/register-list-query-I65EZ3HB.js.map +1 -0
  246. package/dist/cli-bundle/chunks/{register-list-query-WST76HSQ.js → register-list-query-OECMHO4G.js} +28 -24
  247. package/dist/cli-bundle/chunks/register-list-query-OECMHO4G.js.map +7 -0
  248. package/dist/cli-bundle/chunks/{register-mutation-N5GSUZJV.js → register-mutation-2FLXORLR.js} +65 -47
  249. package/dist/cli-bundle/chunks/register-mutation-2FLXORLR.js.map +1 -0
  250. package/dist/cli-bundle/chunks/{register-mutation-OA675SOU.js → register-mutation-5GPDEKHR.js} +64 -46
  251. package/dist/cli-bundle/chunks/register-mutation-5GPDEKHR.js.map +7 -0
  252. package/dist/cli-bundle/chunks/{register-operations-GNHBE5I3.js → register-operations-BNGAUMGK.js} +58 -35
  253. package/dist/cli-bundle/chunks/register-operations-BNGAUMGK.js.map +1 -0
  254. package/dist/cli-bundle/chunks/{register-operations-N3PMHXH5.js → register-operations-GQKT35H5.js} +57 -34
  255. package/dist/cli-bundle/chunks/register-operations-GQKT35H5.js.map +7 -0
  256. package/dist/cli-bundle/chunks/{register-setup-JIMPKJKV.js → register-setup-DNDCGZ4O.js} +18 -18
  257. package/dist/cli-bundle/chunks/{register-setup-JIMPKJKV.js.map → register-setup-DNDCGZ4O.js.map} +1 -1
  258. package/dist/cli-bundle/chunks/{register-setup-ZHJI2DI3.js → register-setup-EJY44FPH.js} +17 -17
  259. package/dist/cli-bundle/chunks/{register-setup-ZHJI2DI3.js.map → register-setup-EJY44FPH.js.map} +2 -2
  260. package/dist/cli-bundle/chunks/{restore-PBL6T5TW.js → restore-DDJGVZIN.js} +11 -11
  261. package/dist/cli-bundle/chunks/restore-SJSASGZP.js +17 -0
  262. package/dist/cli-bundle/chunks/{schema-2NOO6NGB.js → schema-B7NQ6XVP.js} +8 -8
  263. package/dist/cli-bundle/chunks/{schema-EBI4NLUO.js → schema-HEGYH6CE.js} +8 -8
  264. package/dist/cli-bundle/chunks/{search-JPUQTVCY.js → search-DVVQ4UO2.js} +421 -42
  265. package/dist/cli-bundle/chunks/search-DVVQ4UO2.js.map +1 -0
  266. package/dist/cli-bundle/chunks/{search-OA6JX27A.js → search-JNEZJV7H.js} +427 -41
  267. package/dist/cli-bundle/chunks/search-JNEZJV7H.js.map +7 -0
  268. package/dist/cli-bundle/chunks/{stats-CV54BAWY.js → stats-7JDIJRDH.js} +7 -7
  269. package/dist/cli-bundle/chunks/{stats-XYB6KTFG.js → stats-SYTJRR4Z.js} +7 -7
  270. package/dist/cli-bundle/chunks/{telemetry-LMJ7PFUO.js → telemetry-4HHWD5Y7.js} +4 -4
  271. package/dist/cli-bundle/chunks/{telemetry-NCMEPJNR.js → telemetry-EGWP7ZUX.js} +4 -4
  272. package/dist/cli-bundle/chunks/{test-WBROAJIE.js → test-IIELLSZX.js} +14 -13
  273. package/dist/cli-bundle/chunks/test-ML5RLWXE.js +32 -0
  274. package/dist/cli-bundle/chunks/{test-all-NTOZ7C3M.js → test-all-7DNCMML7.js} +14 -13
  275. package/dist/cli-bundle/chunks/{test-all-NTOZ7C3M.js.map → test-all-7DNCMML7.js.map} +1 -1
  276. package/dist/cli-bundle/chunks/{test-all-N6NSRDTV.js → test-all-IHTUJRRC.js} +16 -15
  277. package/dist/cli-bundle/chunks/{test-all-N6NSRDTV.js.map → test-all-IHTUJRRC.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{test-runs-V6A7LPWZ.js → test-runs-5FEMBV3A.js} +5 -5
  279. package/dist/cli-bundle/chunks/{test-runs-WMVTQU3Y.js → test-runs-RNKZ37PS.js} +5 -5
  280. package/dist/cli-bundle/chunks/update-6C67X4KS.js +21 -0
  281. package/dist/cli-bundle/chunks/update-VF26YPT3.js +25 -0
  282. package/dist/cli-bundle/chunks/{update-many-KGGEYABR.js → update-many-BSZZZYXY.js} +22 -22
  283. package/dist/cli-bundle/chunks/{update-many-EM6OXYGO.js → update-many-BWKJJEBF.js} +22 -22
  284. package/dist/cli-bundle/chunks/{upgrade-LXPOQKFV.js → upgrade-RSE5PC44.js} +7 -6
  285. package/dist/cli-bundle/chunks/{upgrade-LXPOQKFV.js.map → upgrade-RSE5PC44.js.map} +1 -1
  286. package/dist/cli-bundle/chunks/{upgrade-BLI7XBAJ.js → upgrade-YWI5DJFA.js} +5 -4
  287. package/dist/cli-bundle/chunks/{upgrade-BLI7XBAJ.js.map → upgrade-YWI5DJFA.js.map} +1 -1
  288. package/dist/cli-bundle/chunks/{validate-AGOAUOVW.js → validate-NK3WKB7C.js} +18 -17
  289. package/dist/cli-bundle/chunks/{validate-AGOAUOVW.js.map → validate-NK3WKB7C.js.map} +1 -1
  290. package/dist/cli-bundle/chunks/{validate-L5J6A7YO.js → validate-UCEOB7S6.js} +20 -19
  291. package/dist/cli-bundle/chunks/{validate-L5J6A7YO.js.map → validate-UCEOB7S6.js.map} +1 -1
  292. package/dist/cli-bundle/main.js +127 -43
  293. package/dist/cli-bundle/main.js.map +3 -3
  294. package/dist/core/config/nested-settings.d.ts +8 -6
  295. package/dist/core/config/nested-settings.js +71 -5
  296. package/dist/core/config/nested-settings.js.map +1 -1
  297. package/dist/core/config/positional-value.js +4 -2
  298. package/dist/core/config/positional-value.js.map +1 -1
  299. package/dist/core/extensions/extension-types.d.ts +36 -0
  300. package/dist/core/extensions/extension-types.js +2 -2
  301. package/dist/core/extensions/extension-types.js.map +1 -1
  302. package/dist/core/extensions/loader.js +46 -5
  303. package/dist/core/extensions/loader.js.map +1 -1
  304. package/dist/core/history/drift-scan.d.ts +3 -4
  305. package/dist/core/history/drift-scan.js +71 -18
  306. package/dist/core/history/drift-scan.js.map +1 -1
  307. package/dist/core/item/id.js +4 -5
  308. package/dist/core/item/id.js.map +1 -1
  309. package/dist/core/item/item-format.js +7 -3
  310. package/dist/core/item/item-format.js.map +1 -1
  311. package/dist/core/item/toon-decode.d.ts +7 -0
  312. package/dist/core/item/toon-decode.js +11 -2
  313. package/dist/core/item/toon-decode.js.map +1 -1
  314. package/dist/core/item/type-registry.js +25 -7
  315. package/dist/core/item/type-registry.js.map +1 -1
  316. package/dist/core/search/cache.js +5 -3
  317. package/dist/core/search/cache.js.map +1 -1
  318. package/dist/core/search/corpus.d.ts +6 -0
  319. package/dist/core/search/corpus.js +22 -9
  320. package/dist/core/search/corpus.js.map +1 -1
  321. package/dist/core/search/embedding-batches.js +10 -7
  322. package/dist/core/search/embedding-batches.js.map +1 -1
  323. package/dist/core/search/relevance.d.ts +29 -0
  324. package/dist/core/search/relevance.js +226 -0
  325. package/dist/core/search/relevance.js.map +1 -0
  326. package/dist/core/search/vector-stores.d.ts +3 -0
  327. package/dist/core/search/vector-stores.js +23 -10
  328. package/dist/core/search/vector-stores.js.map +1 -1
  329. package/dist/core/shared/constants.js +15 -2
  330. package/dist/core/shared/constants.js.map +1 -1
  331. package/dist/core/shared/errors.d.ts +6 -0
  332. package/dist/core/shared/errors.js +2 -2
  333. package/dist/core/shared/errors.js.map +1 -1
  334. package/dist/core/shared/primitives.d.ts +8 -0
  335. package/dist/core/shared/primitives.js +29 -2
  336. package/dist/core/shared/primitives.js.map +1 -1
  337. package/dist/core/shared/time.js +42 -6
  338. package/dist/core/shared/time.js.map +1 -1
  339. package/dist/core/store/paths.js +25 -7
  340. package/dist/core/store/paths.js.map +1 -1
  341. package/dist/core/store/settings-validator.d.ts +11 -0
  342. package/dist/core/store/settings-validator.js +14 -2
  343. package/dist/core/store/settings-validator.js.map +1 -1
  344. package/dist/core/store/settings.js +109 -12
  345. package/dist/core/store/settings.js.map +1 -1
  346. package/dist/core/telemetry/runtime.js +85 -4
  347. package/dist/core/telemetry/runtime.js.map +1 -1
  348. package/dist/mcp/server.js +36 -9
  349. package/dist/mcp/server.js.map +1 -1
  350. package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
  351. package/dist/sdk/cli-contracts/commander-types.js +13 -2
  352. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  353. package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
  354. package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
  355. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  356. package/dist/sdk/cli-contracts/tool-option-contracts.js +7 -2
  357. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  358. package/dist/sdk/cli-contracts/tool-parameter-tables.js +31 -2
  359. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  360. package/dist/sdk/cli-contracts.d.ts +3 -1
  361. package/dist/sdk/cli-contracts.js +36 -6
  362. package/dist/sdk/cli-contracts.js.map +1 -1
  363. package/dist/sdk/index.d.ts +2 -2
  364. package/dist/sdk/index.js +3 -3
  365. package/dist/sdk/index.js.map +1 -1
  366. package/dist/sdk/testing.d.ts +51 -1
  367. package/dist/sdk/testing.js +93 -2
  368. package/dist/sdk/testing.js.map +1 -1
  369. package/dist/types.d.ts +14 -0
  370. package/dist/types.js +2 -2
  371. package/dist/types.js.map +1 -1
  372. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  373. package/docs/CODEX_PLUGIN.md +1 -1
  374. package/docs/COMMANDS.md +9 -2
  375. package/docs/CONFIGURATION.md +22 -1
  376. package/docs/EXTENSIONS.md +22 -9
  377. package/docs/QUICKSTART.md +1 -1
  378. package/docs/SDK.md +66 -0
  379. package/docs/TESTING.md +14 -0
  380. package/package.json +2 -1
  381. package/packages/pm-governance-audit/README.md +14 -0
  382. package/packages/pm-governance-audit/extensions/governance-audit/index.js +39 -1
  383. package/packages/pm-governance-audit/extensions/governance-audit/index.ts +40 -2
  384. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +1 -1
  385. package/packages/pm-governance-audit/package.json +4 -2
  386. package/packages/pm-lifecycle-hooks/README.md +21 -0
  387. package/packages/pm-search-advanced/README.md +38 -0
  388. package/packages/pm-search-advanced/extensions/search-advanced/index.js +17 -0
  389. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +17 -0
  390. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +216 -1
  391. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +271 -2
  392. package/plugins/pm-claude/README.md +4 -4
  393. package/plugins/pm-codex/README.md +1 -1
  394. package/dist/cli-bundle/chunks/activity-CVXTCHYY.js +0 -16
  395. package/dist/cli-bundle/chunks/aggregate-GI7WSZPH.js.map +0 -1
  396. package/dist/cli-bundle/chunks/aggregate-VNAHUNNF.js.map +0 -7
  397. package/dist/cli-bundle/chunks/chunk-2VBQ6ZXS.js.map +0 -1
  398. package/dist/cli-bundle/chunks/chunk-3FI4SEFT.js.map +0 -7
  399. package/dist/cli-bundle/chunks/chunk-4LL6TK5B.js.map +0 -1
  400. package/dist/cli-bundle/chunks/chunk-52MAOQ6J.js.map +0 -7
  401. package/dist/cli-bundle/chunks/chunk-5FDATVEZ.js.map +0 -1
  402. package/dist/cli-bundle/chunks/chunk-5SFCOO6B.js.map +0 -1
  403. package/dist/cli-bundle/chunks/chunk-ECCMVXGM.js.map +0 -7
  404. package/dist/cli-bundle/chunks/chunk-FRAUKRU2.js.map +0 -1
  405. package/dist/cli-bundle/chunks/chunk-GU2ZJ2VV.js.map +0 -7
  406. package/dist/cli-bundle/chunks/chunk-HZGUAH22.js.map +0 -1
  407. package/dist/cli-bundle/chunks/chunk-IOR7LGF4.js.map +0 -1
  408. package/dist/cli-bundle/chunks/chunk-KJE2FOS4.js.map +0 -7
  409. package/dist/cli-bundle/chunks/chunk-KWU6HG75.js.map +0 -1
  410. package/dist/cli-bundle/chunks/chunk-LB3RUL2N.js.map +0 -1
  411. package/dist/cli-bundle/chunks/chunk-PDDFYW4X.js.map +0 -7
  412. package/dist/cli-bundle/chunks/chunk-PROOHX4K.js.map +0 -7
  413. package/dist/cli-bundle/chunks/chunk-Q7SPNHLW.js.map +0 -7
  414. package/dist/cli-bundle/chunks/chunk-QO7EBBOM.js.map +0 -7
  415. package/dist/cli-bundle/chunks/chunk-SKJWX3QB.js.map +0 -7
  416. package/dist/cli-bundle/chunks/chunk-T3LC5LKB.js.map +0 -7
  417. package/dist/cli-bundle/chunks/chunk-TCD3R2PF.js.map +0 -1
  418. package/dist/cli-bundle/chunks/chunk-TPH5XEVD.js.map +0 -1
  419. package/dist/cli-bundle/chunks/chunk-U5SXYXSY.js.map +0 -7
  420. package/dist/cli-bundle/chunks/chunk-W7XABV4H.js.map +0 -1
  421. package/dist/cli-bundle/chunks/chunk-WOPXVEZP.js.map +0 -1
  422. package/dist/cli-bundle/chunks/close-3HDWDA3L.js +0 -13
  423. package/dist/cli-bundle/chunks/close-many-7CGIDPTJ.js.map +0 -7
  424. package/dist/cli-bundle/chunks/close-many-ERFO6LHR.js.map +0 -1
  425. package/dist/cli-bundle/chunks/config-6FXCQKIF.js.map +0 -1
  426. package/dist/cli-bundle/chunks/config-U4RZ4CQB.js.map +0 -7
  427. package/dist/cli-bundle/chunks/context-YMJ3Z2HQ.js.map +0 -1
  428. package/dist/cli-bundle/chunks/contracts-QDB6OMLQ.js.map +0 -1
  429. package/dist/cli-bundle/chunks/contracts-RFSPGVVJ.js.map +0 -7
  430. package/dist/cli-bundle/chunks/create-JTZNCTQC.js +0 -27
  431. package/dist/cli-bundle/chunks/get-RV37HT3G.js.map +0 -1
  432. package/dist/cli-bundle/chunks/get-WXU6WI5P.js.map +0 -7
  433. package/dist/cli-bundle/chunks/history-2BA3T5AE.js +0 -20
  434. package/dist/cli-bundle/chunks/history-redact-JBZNXHGR.js +0 -19
  435. package/dist/cli-bundle/chunks/init-HIVSNX3O.js +0 -16
  436. package/dist/cli-bundle/chunks/list-MUSQNMTD.js +0 -20
  437. package/dist/cli-bundle/chunks/register-list-query-POCFZ5JW.js.map +0 -1
  438. package/dist/cli-bundle/chunks/register-list-query-WST76HSQ.js.map +0 -7
  439. package/dist/cli-bundle/chunks/register-mutation-N5GSUZJV.js.map +0 -1
  440. package/dist/cli-bundle/chunks/register-mutation-OA675SOU.js.map +0 -7
  441. package/dist/cli-bundle/chunks/register-operations-GNHBE5I3.js.map +0 -1
  442. package/dist/cli-bundle/chunks/register-operations-N3PMHXH5.js.map +0 -7
  443. package/dist/cli-bundle/chunks/restore-D4RGNX33.js +0 -17
  444. package/dist/cli-bundle/chunks/search-JPUQTVCY.js.map +0 -1
  445. package/dist/cli-bundle/chunks/search-OA6JX27A.js.map +0 -7
  446. package/dist/cli-bundle/chunks/test-MXX3E5JL.js +0 -31
  447. package/dist/cli-bundle/chunks/update-OSV3NAQB.js +0 -25
  448. package/dist/cli-bundle/chunks/update-YRXSUGYQ.js +0 -21
  449. /package/dist/cli-bundle/chunks/{activity-CVXTCHYY.js.map → activity-5UROHJ3D.js.map} +0 -0
  450. /package/dist/cli-bundle/chunks/{activity-JM6DTDND.js.map → activity-YVB3QRTE.js.map} +0 -0
  451. /package/dist/cli-bundle/chunks/{append-WMKRXKCE.js.map → append-2PPYFAG5.js.map} +0 -0
  452. /package/dist/cli-bundle/chunks/{append-7H5N64R2.js.map → append-AUGT5W6J.js.map} +0 -0
  453. /package/dist/cli-bundle/chunks/{chunk-6P6GGMOG.js.map → chunk-2IF7WLB7.js.map} +0 -0
  454. /package/dist/cli-bundle/chunks/{chunk-KAG77BY3.js.map → chunk-2OJHLWBZ.js.map} +0 -0
  455. /package/dist/cli-bundle/chunks/{chunk-GXSUPCBV.js.map → chunk-3A2CMEM7.js.map} +0 -0
  456. /package/dist/cli-bundle/chunks/{chunk-UM2GBHS4.js.map → chunk-3EOBJOF4.js.map} +0 -0
  457. /package/dist/cli-bundle/chunks/{chunk-PRJCELV4.js.map → chunk-4CHEG6UK.js.map} +0 -0
  458. /package/dist/cli-bundle/chunks/{chunk-OZ7NSQHL.js.map → chunk-5AXMRKN5.js.map} +0 -0
  459. /package/dist/cli-bundle/chunks/{chunk-GCOQW437.js.map → chunk-6J4K6JLA.js.map} +0 -0
  460. /package/dist/cli-bundle/chunks/{chunk-2RSPZI5H.js.map → chunk-6RZXO5M2.js.map} +0 -0
  461. /package/dist/cli-bundle/chunks/{chunk-KJ33AOCY.js.map → chunk-AVJD6VTA.js.map} +0 -0
  462. /package/dist/cli-bundle/chunks/{chunk-I6BNFU5X.js.map → chunk-B5RF3IP7.js.map} +0 -0
  463. /package/dist/cli-bundle/chunks/{chunk-RZN6VURO.js.map → chunk-C5W2UH56.js.map} +0 -0
  464. /package/dist/cli-bundle/chunks/{chunk-3LB74A67.js.map → chunk-CKLBZHS7.js.map} +0 -0
  465. /package/dist/cli-bundle/chunks/{chunk-3VAM3NNM.js.map → chunk-FY6Z3FYY.js.map} +0 -0
  466. /package/dist/cli-bundle/chunks/{chunk-RWPSOIEE.js.map → chunk-GNIUOLZ2.js.map} +0 -0
  467. /package/dist/cli-bundle/chunks/{chunk-MITFDD35.js.map → chunk-GPXQBR3H.js.map} +0 -0
  468. /package/dist/cli-bundle/chunks/{chunk-I2HSTRJF.js.map → chunk-H7EO3QA3.js.map} +0 -0
  469. /package/dist/cli-bundle/chunks/{chunk-77GFDHGF.js.map → chunk-HLC3KTLP.js.map} +0 -0
  470. /package/dist/cli-bundle/chunks/{chunk-OVQCEJPG.js.map → chunk-HMMMWBK2.js.map} +0 -0
  471. /package/dist/cli-bundle/chunks/{chunk-XLTD2HN3.js.map → chunk-HV5SSZXF.js.map} +0 -0
  472. /package/dist/cli-bundle/chunks/{chunk-2HVRUSQA.js.map → chunk-KNGVP5WJ.js.map} +0 -0
  473. /package/dist/cli-bundle/chunks/{chunk-3BWOVLTH.js.map → chunk-LI65XLJR.js.map} +0 -0
  474. /package/dist/cli-bundle/chunks/{chunk-NUZ5HKR4.js.map → chunk-LIN2BPJ7.js.map} +0 -0
  475. /package/dist/cli-bundle/chunks/{chunk-N7ACFE26.js.map → chunk-LQHBENVW.js.map} +0 -0
  476. /package/dist/cli-bundle/chunks/{chunk-23YFZ3IG.js.map → chunk-LXO6V66E.js.map} +0 -0
  477. /package/dist/cli-bundle/chunks/{chunk-PIU6RSL3.js.map → chunk-MOYM2C3J.js.map} +0 -0
  478. /package/dist/cli-bundle/chunks/{chunk-IJGCZSIQ.js.map → chunk-NQL32HQ5.js.map} +0 -0
  479. /package/dist/cli-bundle/chunks/{chunk-6ER6DXH5.js.map → chunk-OKSKJKHX.js.map} +0 -0
  480. /package/dist/cli-bundle/chunks/{chunk-2VVCGBNV.js.map → chunk-R3V3YCMH.js.map} +0 -0
  481. /package/dist/cli-bundle/chunks/{chunk-UBOPJT3S.js.map → chunk-RVPTZKBC.js.map} +0 -0
  482. /package/dist/cli-bundle/chunks/{chunk-WKY2IBOQ.js.map → chunk-SFFVGNHC.js.map} +0 -0
  483. /package/dist/cli-bundle/chunks/{chunk-WSMOSYRD.js.map → chunk-SQPKRA54.js.map} +0 -0
  484. /package/dist/cli-bundle/chunks/{chunk-YL2DJGYS.js.map → chunk-TNPBPNII.js.map} +0 -0
  485. /package/dist/cli-bundle/chunks/{chunk-XTGLRY2Y.js.map → chunk-TP4DDY27.js.map} +0 -0
  486. /package/dist/cli-bundle/chunks/{chunk-AY43SBIN.js.map → chunk-TYJJOTUA.js.map} +0 -0
  487. /package/dist/cli-bundle/chunks/{chunk-LCM63IXU.js.map → chunk-UAQOQ7IE.js.map} +0 -0
  488. /package/dist/cli-bundle/chunks/{chunk-BQHUILZS.js.map → chunk-UEWA73ZZ.js.map} +0 -0
  489. /package/dist/cli-bundle/chunks/{chunk-PO3GSVFV.js.map → chunk-UIIQC5YO.js.map} +0 -0
  490. /package/dist/cli-bundle/chunks/{chunk-R6UFP2GE.js.map → chunk-V6EYFTRL.js.map} +0 -0
  491. /package/dist/cli-bundle/chunks/{chunk-XSJCLN2R.js.map → chunk-WYEXLDDY.js.map} +0 -0
  492. /package/dist/cli-bundle/chunks/{chunk-E5FJNAZA.js.map → chunk-X7UHMKPE.js.map} +0 -0
  493. /package/dist/cli-bundle/chunks/{chunk-GGYWB3Y2.js.map → chunk-YBZW2QQ7.js.map} +0 -0
  494. /package/dist/cli-bundle/chunks/{chunk-ME2YH6FN.js.map → chunk-YO3THIJF.js.map} +0 -0
  495. /package/dist/cli-bundle/chunks/{claim-X2P4IB7J.js.map → claim-BJ4QMPJC.js.map} +0 -0
  496. /package/dist/cli-bundle/chunks/{claim-4DBF6RVG.js.map → claim-KW743OSW.js.map} +0 -0
  497. /package/dist/cli-bundle/chunks/{close-3HDWDA3L.js.map → close-P4ZBKODL.js.map} +0 -0
  498. /package/dist/cli-bundle/chunks/{close-PTYFA45H.js.map → close-SYHSRZDC.js.map} +0 -0
  499. /package/dist/cli-bundle/chunks/{comments-QKBYCWKD.js.map → comments-JEO6HHVM.js.map} +0 -0
  500. /package/dist/cli-bundle/chunks/{comments-OONGABK5.js.map → comments-YT2PQ5DD.js.map} +0 -0
  501. /package/dist/cli-bundle/chunks/{create-JTZNCTQC.js.map → create-4DS2QWQC.js.map} +0 -0
  502. /package/dist/cli-bundle/chunks/{create-I5L4EYYZ.js.map → create-CF7EVRX7.js.map} +0 -0
  503. /package/dist/cli-bundle/chunks/{delete-7HPGI4GZ.js.map → delete-KR4VBWVE.js.map} +0 -0
  504. /package/dist/cli-bundle/chunks/{delete-VXUPH5RS.js.map → delete-XLZRTRKR.js.map} +0 -0
  505. /package/dist/cli-bundle/chunks/{deps-JSRRWC3Z.js.map → deps-2YTXD3VM.js.map} +0 -0
  506. /package/dist/cli-bundle/chunks/{deps-SCZIFK2Z.js.map → deps-GZMFMTGS.js.map} +0 -0
  507. /package/dist/cli-bundle/chunks/{docs-GJK6K4VP.js.map → docs-SLROFEQ4.js.map} +0 -0
  508. /package/dist/cli-bundle/chunks/{docs-WW4N3MBM.js.map → docs-ZHISRR2D.js.map} +0 -0
  509. /package/dist/cli-bundle/chunks/{extension-J7IBMFTD.js.map → extension-3C7OOI4F.js.map} +0 -0
  510. /package/dist/cli-bundle/chunks/{extension-VDY2U33M.js.map → extension-XYCUXICD.js.map} +0 -0
  511. /package/dist/cli-bundle/chunks/{files-ISZJGILQ.js.map → files-FUWF2FYJ.js.map} +0 -0
  512. /package/dist/cli-bundle/chunks/{files-WKOD326U.js.map → files-J4I5IU4O.js.map} +0 -0
  513. /package/dist/cli-bundle/chunks/{gc-JDVJ6OQ2.js.map → gc-34NXSNSN.js.map} +0 -0
  514. /package/dist/cli-bundle/chunks/{gc-ULPVWMTN.js.map → gc-SPIIZX3A.js.map} +0 -0
  515. /package/dist/cli-bundle/chunks/{history-PKN67D5O.js.map → history-SDAWYZR3.js.map} +0 -0
  516. /package/dist/cli-bundle/chunks/{history-2BA3T5AE.js.map → history-YDUEILKP.js.map} +0 -0
  517. /package/dist/cli-bundle/chunks/{history-redact-V4FOJGS7.js.map → history-redact-EPJ7GENL.js.map} +0 -0
  518. /package/dist/cli-bundle/chunks/{history-redact-JBZNXHGR.js.map → history-redact-KASLLPE7.js.map} +0 -0
  519. /package/dist/cli-bundle/chunks/{history-repair-SDMHR7JT.js.map → history-repair-IJ7LLBET.js.map} +0 -0
  520. /package/dist/cli-bundle/chunks/{history-repair-HIBCBIKK.js.map → history-repair-YNESJRT6.js.map} +0 -0
  521. /package/dist/cli-bundle/chunks/{init-HIVSNX3O.js.map → init-IGSS4GNH.js.map} +0 -0
  522. /package/dist/cli-bundle/chunks/{init-P56QYWJF.js.map → init-YHVBTEET.js.map} +0 -0
  523. /package/dist/cli-bundle/chunks/{learnings-GDFRG5J7.js.map → learnings-4YBMIVCZ.js.map} +0 -0
  524. /package/dist/cli-bundle/chunks/{learnings-MIXSESLK.js.map → learnings-T4PF24YN.js.map} +0 -0
  525. /package/dist/cli-bundle/chunks/{list-FGOWQMSM.js.map → list-3KEVBOYW.js.map} +0 -0
  526. /package/dist/cli-bundle/chunks/{list-MUSQNMTD.js.map → list-E44O2K64.js.map} +0 -0
  527. /package/dist/cli-bundle/chunks/{notes-4XVSH2AZ.js.map → notes-FLUCNJSH.js.map} +0 -0
  528. /package/dist/cli-bundle/chunks/{notes-5UK3GEH2.js.map → notes-GJKALVZM.js.map} +0 -0
  529. /package/dist/cli-bundle/chunks/{plan-SLMODHWX.js.map → plan-T5MMZLI3.js.map} +0 -0
  530. /package/dist/cli-bundle/chunks/{plan-DUMBV3QB.js.map → plan-YYMIL3HV.js.map} +0 -0
  531. /package/dist/cli-bundle/chunks/{restore-PBL6T5TW.js.map → restore-DDJGVZIN.js.map} +0 -0
  532. /package/dist/cli-bundle/chunks/{restore-D4RGNX33.js.map → restore-SJSASGZP.js.map} +0 -0
  533. /package/dist/cli-bundle/chunks/{schema-2NOO6NGB.js.map → schema-B7NQ6XVP.js.map} +0 -0
  534. /package/dist/cli-bundle/chunks/{schema-EBI4NLUO.js.map → schema-HEGYH6CE.js.map} +0 -0
  535. /package/dist/cli-bundle/chunks/{stats-CV54BAWY.js.map → stats-7JDIJRDH.js.map} +0 -0
  536. /package/dist/cli-bundle/chunks/{stats-XYB6KTFG.js.map → stats-SYTJRR4Z.js.map} +0 -0
  537. /package/dist/cli-bundle/chunks/{telemetry-LMJ7PFUO.js.map → telemetry-4HHWD5Y7.js.map} +0 -0
  538. /package/dist/cli-bundle/chunks/{telemetry-NCMEPJNR.js.map → telemetry-EGWP7ZUX.js.map} +0 -0
  539. /package/dist/cli-bundle/chunks/{test-WBROAJIE.js.map → test-IIELLSZX.js.map} +0 -0
  540. /package/dist/cli-bundle/chunks/{test-MXX3E5JL.js.map → test-ML5RLWXE.js.map} +0 -0
  541. /package/dist/cli-bundle/chunks/{test-runs-V6A7LPWZ.js.map → test-runs-5FEMBV3A.js.map} +0 -0
  542. /package/dist/cli-bundle/chunks/{test-runs-WMVTQU3Y.js.map → test-runs-RNKZ37PS.js.map} +0 -0
  543. /package/dist/cli-bundle/chunks/{update-YRXSUGYQ.js.map → update-6C67X4KS.js.map} +0 -0
  544. /package/dist/cli-bundle/chunks/{update-OSV3NAQB.js.map → update-VF26YPT3.js.map} +0 -0
  545. /package/dist/cli-bundle/chunks/{update-many-KGGEYABR.js.map → update-many-BSZZZYXY.js.map} +0 -0
  546. /package/dist/cli-bundle/chunks/{update-many-EM6OXYGO.js.map → update-many-BWKJJEBF.js.map} +0 -0
@@ -1,11 +1,18 @@
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]="e39bfbe4-484e-5544-affb-f1f6fbd63030")}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]="bbca734a-ed22-5880-ac8f-334fdbfd62ae")}catch(e){}}();
3
+ import {
4
+ normalizeExtensionNameForMatch,
5
+ normalizeManagedDirectoryName,
6
+ normalizeStringList,
7
+ parseExtensionManifest,
8
+ validateExtensionDirectory
9
+ } from "./chunk-LMTOY5HE.js";
3
10
  import {
4
11
  splitCommaList
5
12
  } from "./chunk-LXYVKYMQ.js";
6
13
  import {
7
14
  nowIso
8
- } from "./chunk-TCD3R2PF.js";
15
+ } from "./chunk-B2KZGPM2.js";
9
16
  import {
10
17
  EXIT_CODE,
11
18
  EXTENSION_CAPABILITY_CONTRACT,
@@ -24,115 +31,22 @@ import {
24
31
  resolvePmPackageRootFromModule,
25
32
  resolvePmRoot,
26
33
  writeSettings
27
- } from "./chunk-5SFCOO6B.js";
34
+ } from "./chunk-X4IZKYHP.js";
28
35
 
29
36
  // dist/cli/commands/extension.js
30
37
  import { execFile as execFile2 } from "node:child_process";
31
- import fs7 from "node:fs/promises";
38
+ import fs6 from "node:fs/promises";
32
39
  import os2 from "node:os";
33
- import path7 from "node:path";
40
+ import path6 from "node:path";
34
41
  import { promisify as promisify2 } from "node:util";
35
42
 
36
- // dist/cli/commands/extension/shared.js
43
+ // dist/cli/commands/extension/managed-state.js
37
44
  import fs from "node:fs/promises";
38
45
  import path from "node:path";
39
- var DEFAULT_EXTENSION_PRIORITY = 100;
40
- function normalizeStringList(values) {
41
- return [...new Set(values.map((value) => value.trim()).filter((value) => value.length > 0))].sort((left, right) => left.localeCompare(right));
42
- }
43
- function normalizeExtensionNameForMatch(value) {
44
- return value.trim().toLowerCase();
45
- }
46
- function normalizeManagedDirectoryName(name) {
47
- const normalized = name.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "");
48
- if (normalized.length === 0) {
49
- throw new PmCliError("Extension manifest name must resolve to a non-empty directory name.", EXIT_CODE.USAGE);
50
- }
51
- if (normalized === "." || normalized === "..") {
52
- throw new PmCliError('Extension manifest name must not resolve to "." or "..".', EXIT_CODE.USAGE);
53
- }
54
- return normalized;
55
- }
56
- function parseExtensionManifest(raw) {
57
- if (typeof raw !== "object" || raw === null) {
58
- return null;
59
- }
60
- const candidate = raw;
61
- if (typeof candidate.name !== "string" || candidate.name.trim().length === 0) {
62
- return null;
63
- }
64
- if (typeof candidate.version !== "string" || candidate.version.trim().length === 0) {
65
- return null;
66
- }
67
- if (typeof candidate.entry !== "string" || candidate.entry.trim().length === 0) {
68
- return null;
69
- }
70
- let priority = DEFAULT_EXTENSION_PRIORITY;
71
- if (candidate.priority !== void 0 && candidate.priority !== null) {
72
- if (typeof candidate.priority !== "number" || !Number.isInteger(candidate.priority)) {
73
- return null;
74
- }
75
- priority = candidate.priority;
76
- }
77
- let capabilities = [];
78
- if (candidate.capabilities !== void 0 && candidate.capabilities !== null) {
79
- if (!Array.isArray(candidate.capabilities) || candidate.capabilities.some((value) => typeof value !== "string")) {
80
- return null;
81
- }
82
- capabilities = normalizeStringList(candidate.capabilities.map((value) => String(value).toLowerCase()));
83
- }
84
- return {
85
- name: candidate.name.trim(),
86
- version: candidate.version.trim(),
87
- entry: candidate.entry.trim(),
88
- priority,
89
- capabilities
90
- };
91
- }
92
- async function isCanonicalPathWithinDirectory(directory, targetPath) {
93
- const [resolvedDirectory, resolvedTargetPath] = await Promise.all([fs.realpath(directory), fs.realpath(targetPath)]);
94
- return isPathWithinDirectory(resolvedDirectory, resolvedTargetPath);
95
- }
96
- async function validateExtensionDirectory(directory) {
97
- const manifestPath = path.join(directory, "manifest.json");
98
- if (!await pathExists(manifestPath)) {
99
- throw new PmCliError(`Extension manifest is missing at "${manifestPath}".`, EXIT_CODE.USAGE);
100
- }
101
- let parsedManifest;
102
- try {
103
- parsedManifest = JSON.parse(await fs.readFile(manifestPath, "utf8"));
104
- } catch (error) {
105
- throw new PmCliError(`Failed to parse extension manifest at "${manifestPath}": ${error instanceof Error ? error.message : String(error)}`, EXIT_CODE.USAGE);
106
- }
107
- const manifest = parseExtensionManifest(parsedManifest);
108
- if (!manifest) {
109
- throw new PmCliError(`Extension manifest at "${manifestPath}" is invalid.`, EXIT_CODE.USAGE);
110
- }
111
- const entryPath = path.resolve(directory, manifest.entry);
112
- if (!isPathWithinDirectory(directory, entryPath)) {
113
- throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory "${directory}".`, EXIT_CODE.USAGE);
114
- }
115
- if (!await pathExists(entryPath)) {
116
- throw new PmCliError(`Extension entry file is missing at "${entryPath}".`, EXIT_CODE.USAGE);
117
- }
118
- if (!await isCanonicalPathWithinDirectory(directory, entryPath)) {
119
- throw new PmCliError(`Extension entry "${manifest.entry}" resolves outside extension directory after symlink resolution.`, EXIT_CODE.USAGE);
120
- }
121
- return {
122
- directory,
123
- manifest_path: manifestPath,
124
- entry_path: entryPath,
125
- manifest
126
- };
127
- }
128
-
129
- // dist/cli/commands/extension/managed-state.js
130
- import fs2 from "node:fs/promises";
131
- import path2 from "node:path";
132
46
  var MANAGED_EXTENSION_STATE_FILENAME = ".managed-extensions.json";
133
47
  var MANAGED_EXTENSION_STATE_VERSION = 1;
134
48
  function resolveManagedExtensionStatePath(extensionsRoot) {
135
- return path2.join(extensionsRoot, MANAGED_EXTENSION_STATE_FILENAME);
49
+ return path.join(extensionsRoot, MANAGED_EXTENSION_STATE_FILENAME);
136
50
  }
137
51
  function createEmptyManagedExtensionState() {
138
52
  return {
@@ -229,7 +143,7 @@ async function readManagedExtensionState(extensionsRoot) {
229
143
  const statePath = resolveManagedExtensionStatePath(extensionsRoot);
230
144
  const fallback = createEmptyManagedExtensionState();
231
145
  try {
232
- const raw = await fs2.readFile(statePath, "utf8");
146
+ const raw = await fs.readFile(statePath, "utf8");
233
147
  const parsed = JSON.parse(raw);
234
148
  const normalized = normalizeManagedState(parsed);
235
149
  if (!normalized) {
@@ -261,8 +175,8 @@ async function writeManagedExtensionState(extensionsRoot, state) {
261
175
  updated_at: nowIso(),
262
176
  entries: sortManagedEntries(state.entries)
263
177
  };
264
- await fs2.mkdir(extensionsRoot, { recursive: true });
265
- await fs2.writeFile(statePath, `${JSON.stringify(normalized, null, 2)}
178
+ await fs.mkdir(extensionsRoot, { recursive: true });
179
+ await fs.writeFile(statePath, `${JSON.stringify(normalized, null, 2)}
266
180
  `, "utf8");
267
181
  }
268
182
  function upsertManagedEntry(state, entry) {
@@ -277,15 +191,15 @@ function upsertManagedEntry(state, entry) {
277
191
 
278
192
  // dist/cli/commands/extension/install-sources.js
279
193
  import { execFile } from "node:child_process";
280
- import fs4 from "node:fs/promises";
194
+ import fs3 from "node:fs/promises";
281
195
  import os from "node:os";
282
- import path4 from "node:path";
196
+ import path3 from "node:path";
283
197
  import { fileURLToPath, pathToFileURL } from "node:url";
284
198
  import { promisify } from "node:util";
285
199
 
286
200
  // dist/core/packages/manifest.js
287
- import fs3 from "node:fs/promises";
288
- import path3 from "node:path";
201
+ import fs2 from "node:fs/promises";
202
+ import path2 from "node:path";
289
203
  var PM_PACKAGE_RESOURCE_KINDS = [
290
204
  "extensions",
291
205
  "docs",
@@ -405,7 +319,7 @@ function normalizePackageCatalogMetadata(raw) {
405
319
  return Object.values(catalog).some((value) => value !== void 0) ? catalog : void 0;
406
320
  }
407
321
  async function readPmPackageManifest(packageRoot) {
408
- const packageJsonPath = path3.join(packageRoot, "package.json");
322
+ const packageJsonPath = path2.join(packageRoot, "package.json");
409
323
  if (!await pathExists(packageJsonPath)) {
410
324
  return {
411
325
  source: "convention",
@@ -414,7 +328,7 @@ async function readPmPackageManifest(packageRoot) {
414
328
  }
415
329
  let parsed;
416
330
  try {
417
- parsed = JSON.parse(await fs3.readFile(packageJsonPath, "utf8"));
331
+ parsed = JSON.parse(await fs2.readFile(packageJsonPath, "utf8"));
418
332
  } catch (error) {
419
333
  throw new PmCliError(`Failed to parse package manifest at "${packageJsonPath}": ${String(error)}`, EXIT_CODE.USAGE);
420
334
  }
@@ -445,21 +359,21 @@ async function listExtensionManifestDirectories(parentDirectory) {
445
359
  if (!await pathExists(parentDirectory)) {
446
360
  return [];
447
361
  }
448
- const entries = await fs3.readdir(parentDirectory, { withFileTypes: true });
362
+ const entries = await fs2.readdir(parentDirectory, { withFileTypes: true });
449
363
  const candidates = [];
450
364
  for (const entry of entries) {
451
365
  if (!entry.isDirectory()) {
452
366
  continue;
453
367
  }
454
- const directory = path3.join(parentDirectory, entry.name);
455
- if (await pathExists(path3.join(directory, "manifest.json"))) {
368
+ const directory = path2.join(parentDirectory, entry.name);
369
+ if (await pathExists(path2.join(directory, "manifest.json"))) {
456
370
  candidates.push(directory);
457
371
  }
458
372
  }
459
373
  return candidates.sort((left, right) => left.localeCompare(right));
460
374
  }
461
375
  async function collectPackageExtensionDirectories(packageRoot) {
462
- if (await pathExists(path3.join(packageRoot, "manifest.json"))) {
376
+ if (await pathExists(path2.join(packageRoot, "manifest.json"))) {
463
377
  return [packageRoot];
464
378
  }
465
379
  const manifest = await readPmPackageManifest(packageRoot);
@@ -469,11 +383,11 @@ async function collectPackageExtensionDirectories(packageRoot) {
469
383
  if (entry.includes("*") || entry.startsWith("!")) {
470
384
  throw new PmCliError(`Package extension entry "${entry}" uses a glob/exclusion pattern. pm package installs currently require concrete extension paths or directories.`, EXIT_CODE.USAGE);
471
385
  }
472
- const absolute = path3.resolve(packageRoot, entry);
386
+ const absolute = path2.resolve(packageRoot, entry);
473
387
  if (!isPathWithinDirectory(packageRoot, absolute)) {
474
388
  throw new PmCliError(`Package extension entry "${entry}" resolves outside package root.`, EXIT_CODE.USAGE);
475
389
  }
476
- if (await pathExists(path3.join(absolute, "manifest.json"))) {
390
+ if (await pathExists(path2.join(absolute, "manifest.json"))) {
477
391
  discovered.add(absolute);
478
392
  continue;
479
393
  }
@@ -483,7 +397,7 @@ async function collectPackageExtensionDirectories(packageRoot) {
483
397
  }
484
398
  if (manifestEntries.length === 0) {
485
399
  for (const root of PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS.extensions) {
486
- for (const child of await listExtensionManifestDirectories(path3.join(packageRoot, root))) {
400
+ for (const child of await listExtensionManifestDirectories(path2.join(packageRoot, root))) {
487
401
  discovered.add(child);
488
402
  }
489
403
  }
@@ -584,7 +498,7 @@ function parseExtensionInstallSource(input, options = {}) {
584
498
  return {
585
499
  kind: "local",
586
500
  input: normalizedInput,
587
- absolute_path: path4.resolve(process.cwd(), normalizedInput)
501
+ absolute_path: path3.resolve(process.cwd(), normalizedInput)
588
502
  };
589
503
  }
590
504
  async function runGitCommand(args) {
@@ -616,9 +530,77 @@ async function runNpmCommand(args, cwd) {
616
530
  ${message}`, EXIT_CODE.GENERIC_FAILURE);
617
531
  }
618
532
  }
533
+ function npmPackageNameFromSpec(spec) {
534
+ const trimmed = spec.trim();
535
+ const withoutAlias = trimmed.includes("@file:") ? trimmed.slice(0, trimmed.lastIndexOf("@file:")) : trimmed;
536
+ if (withoutAlias.startsWith("@")) {
537
+ const scoped = withoutAlias.match(/^(@[^/@\s]+\/[^/@\s]+)/);
538
+ return scoped?.[1] ?? withoutAlias;
539
+ }
540
+ const unscoped = withoutAlias.match(/^([^/@\s]+)/);
541
+ return unscoped?.[1] ?? withoutAlias;
542
+ }
543
+ function isNpmNotFoundError(error) {
544
+ const message = error instanceof Error ? error.message : String(error);
545
+ const normalized = message.toLowerCase();
546
+ return normalized.includes("npm err! code e404") || normalized.includes("404 not found") || normalized.includes("is not in this registry");
547
+ }
548
+ function isNpmPackNotFoundError(error) {
549
+ const message = error instanceof Error ? error.message : String(error);
550
+ const normalized = message.toLowerCase();
551
+ return isNpmNotFoundError(error) || normalized.includes("not found");
552
+ }
553
+ function isFirstPartyPmPackageName(packageName) {
554
+ const normalized = packageName.trim().toLowerCase();
555
+ return normalized.startsWith("@unbrained/pm-") || normalized.startsWith("pm-");
556
+ }
557
+ function buildNpmNotFoundRecovery(spec) {
558
+ const packageName = npmPackageNameFromSpec(spec);
559
+ const isFirstPartyPackage = isFirstPartyPmPackageName(packageName);
560
+ const repoName = packageName.split("/").at(-1) ?? packageName;
561
+ const githubSource = isFirstPartyPackage ? `github.com/unbraind/${repoName}` : void 0;
562
+ const nextBestCommand = githubSource ? `pm install --project ${githubSource}` : void 0;
563
+ return {
564
+ message: isFirstPartyPackage ? `npm package "${spec}" was not found in the registry. If this is an unpublished first-party pm package, install its GitHub repository instead.` : `npm package "${spec}" was not found in the registry.`,
565
+ context: {
566
+ code: "npm_package_not_found",
567
+ required: "Use an install source that exists, or publish the npm package before installing it with npm:<name>.",
568
+ why: "Classifying npm 404s avoids repeated registry retries and gives agents a deterministic fallback path.",
569
+ examples: nextBestCommand ? [nextBestCommand, `pm package catalog --project --json`] : [`npm view ${packageName}`, `pm package catalog --project --json`],
570
+ nextSteps: nextBestCommand ? [
571
+ `Try ${nextBestCommand} if the repository exists.`,
572
+ "Use pm package catalog --project --json to inspect bundled package aliases before installing."
573
+ ] : [
574
+ `Verify ${packageName} exists in the npm registry and that you have access to it.`,
575
+ "Use pm package catalog --project --json to inspect bundled package aliases before installing."
576
+ ],
577
+ recovery: {
578
+ attempted_command: `pm install --project npm:${spec}`,
579
+ normalized_args: ["install", "--project", `npm:${spec}`],
580
+ ...githubSource && nextBestCommand ? {
581
+ fallback_candidates: [
582
+ {
583
+ source: githubSource,
584
+ command: nextBestCommand,
585
+ reason: "canonical first-party GitHub repository fallback for unpublished pm packages"
586
+ }
587
+ ],
588
+ next_best_command: nextBestCommand
589
+ } : {}
590
+ }
591
+ }
592
+ };
593
+ }
594
+ function wrapNpmPackResolutionError(spec, error) {
595
+ if (!isNpmPackNotFoundError(error)) {
596
+ return null;
597
+ }
598
+ const recovery = buildNpmNotFoundRecovery(spec);
599
+ return new PmCliError(recovery.message, EXIT_CODE.NOT_FOUND, recovery.context);
600
+ }
619
601
  async function resolveLocalNpmPackagePath(spec) {
620
- if (path4.isAbsolute(spec) || spec.startsWith(".") || spec.startsWith("..")) {
621
- const absolutePath = path4.resolve(process.cwd(), spec);
602
+ if (path3.isAbsolute(spec) || spec.startsWith(".") || spec.startsWith("..")) {
603
+ const absolutePath = path3.resolve(process.cwd(), spec);
622
604
  return await pathExists(absolutePath) ? absolutePath : null;
623
605
  }
624
606
  try {
@@ -630,7 +612,7 @@ async function resolveLocalNpmPackagePath(spec) {
630
612
  } catch {
631
613
  }
632
614
  if (!/^[a-z][a-z0-9+.-]*:/i.test(spec)) {
633
- const absolutePath = path4.resolve(process.cwd(), spec);
615
+ const absolutePath = path3.resolve(process.cwd(), spec);
634
616
  if (await pathExists(absolutePath)) {
635
617
  return absolutePath;
636
618
  }
@@ -662,7 +644,7 @@ function normalizeNpmLocalFileAliasSpec(spec, cwd = process.cwd()) {
662
644
  if (packageName.trim().length === 0 || target.trim().length === 0 || target.startsWith("//")) {
663
645
  return spec;
664
646
  }
665
- const absolutePath = path4.isAbsolute(target) || path4.win32.isAbsolute(target) ? target : path4.resolve(cwd, target);
647
+ const absolutePath = path3.isAbsolute(target) || path3.win32.isAbsolute(target) ? target : path3.resolve(cwd, target);
666
648
  return `${packageName}@${pathToFileURL(absolutePath).href}`;
667
649
  }
668
650
  function parsePackedNpmPackage(stdout, packDirectory) {
@@ -671,7 +653,7 @@ function parsePackedNpmPackage(stdout, packDirectory) {
671
653
  const first = Array.isArray(parsed) ? parsed[0] : void 0;
672
654
  if (first && typeof first.filename === "string" && first.filename.trim().length > 0) {
673
655
  return {
674
- tarball: path4.resolve(packDirectory, first.filename),
656
+ tarball: path3.resolve(packDirectory, first.filename),
675
657
  package: typeof first.name === "string" ? first.name : void 0,
676
658
  version: typeof first.version === "string" ? first.version : void 0
677
659
  };
@@ -683,14 +665,14 @@ function parsePackedNpmPackage(stdout, packDirectory) {
683
665
  throw new PmCliError("npm pack did not report a tarball filename.", EXIT_CODE.GENERIC_FAILURE);
684
666
  }
685
667
  return {
686
- tarball: path4.resolve(packDirectory, lastLine)
668
+ tarball: path3.resolve(packDirectory, lastLine)
687
669
  };
688
670
  }
689
671
  async function resolveNpmSourceDirectory(source) {
690
672
  const localPackageRoot = await resolveLocalNpmPackagePath(source.spec);
691
673
  if (localPackageRoot) {
692
- const packageJsonPath = path4.join(localPackageRoot, "package.json");
693
- const packageJson = await pathExists(packageJsonPath) ? JSON.parse(await fs4.readFile(packageJsonPath, "utf8")) : {};
674
+ const packageJsonPath = path3.join(localPackageRoot, "package.json");
675
+ const packageJson = await pathExists(packageJsonPath) ? JSON.parse(await fs3.readFile(packageJsonPath, "utf8")) : {};
694
676
  return {
695
677
  directory: await resolvePackageExtensionDirectory(localPackageRoot, source.input),
696
678
  package: typeof packageJson.name === "string" ? packageJson.name : void 0,
@@ -699,17 +681,17 @@ async function resolveNpmSourceDirectory(source) {
699
681
  }
700
682
  };
701
683
  }
702
- const tempRoot = await fs4.mkdtemp(path4.join(os.tmpdir(), "pm-npm-package-source-"));
703
- const packDirectory = path4.join(tempRoot, "pack");
704
- const extractDirectory = path4.join(tempRoot, "extract");
705
- await fs4.mkdir(packDirectory, { recursive: true });
706
- await fs4.mkdir(extractDirectory, { recursive: true });
684
+ const tempRoot = await fs3.mkdtemp(path3.join(os.tmpdir(), "pm-npm-package-source-"));
685
+ const packDirectory = path3.join(tempRoot, "pack");
686
+ const extractDirectory = path3.join(tempRoot, "extract");
687
+ await fs3.mkdir(packDirectory, { recursive: true });
688
+ await fs3.mkdir(extractDirectory, { recursive: true });
707
689
  try {
708
690
  const packSpec = await resolveNpmPackSpec(source.spec);
709
691
  const packStdout = await runNpmCommand(["pack", packSpec, "--json", "--pack-destination", packDirectory]);
710
692
  const packed = parsePackedNpmPackage(packStdout, packDirectory);
711
693
  await execFileAsync("tar", ["-xzf", packed.tarball, "-C", extractDirectory], { encoding: "utf8" });
712
- const packageRoot = path4.join(extractDirectory, "package");
694
+ const packageRoot = path3.join(extractDirectory, "package");
713
695
  await installNpmPackageRuntimeDependencies(packageRoot);
714
696
  const directory = await resolvePackageExtensionDirectory(packageRoot, source.input);
715
697
  return {
@@ -717,22 +699,26 @@ async function resolveNpmSourceDirectory(source) {
717
699
  package: packed.package,
718
700
  version: packed.version,
719
701
  cleanup: async () => {
720
- await fs4.rm(tempRoot, { recursive: true, force: true });
702
+ await fs3.rm(tempRoot, { recursive: true, force: true });
721
703
  }
722
704
  };
723
705
  } catch (error) {
724
- await fs4.rm(tempRoot, { recursive: true, force: true });
706
+ await fs3.rm(tempRoot, { recursive: true, force: true });
707
+ const wrappedError = wrapNpmPackResolutionError(source.spec, error);
708
+ if (wrappedError) {
709
+ throw wrappedError;
710
+ }
725
711
  throw error;
726
712
  }
727
713
  }
728
714
  async function installNpmPackageRuntimeDependencies(packageRoot) {
729
- const packageJsonPath = path4.join(packageRoot, "package.json");
715
+ const packageJsonPath = path3.join(packageRoot, "package.json");
730
716
  if (!await pathExists(packageJsonPath)) {
731
717
  return;
732
718
  }
733
719
  let parsed;
734
720
  try {
735
- parsed = JSON.parse(await fs4.readFile(packageJsonPath, "utf8"));
721
+ parsed = JSON.parse(await fs3.readFile(packageJsonPath, "utf8"));
736
722
  } catch {
737
723
  return;
738
724
  }
@@ -746,11 +732,11 @@ async function installNpmPackageRuntimeDependencies(packageRoot) {
746
732
  }
747
733
  const runtimeOnlyManifest = { ...parsed };
748
734
  delete runtimeOnlyManifest.devDependencies;
749
- await fs4.writeFile(packageJsonPath, `${JSON.stringify(runtimeOnlyManifest, null, 2)}
735
+ await fs3.writeFile(packageJsonPath, `${JSON.stringify(runtimeOnlyManifest, null, 2)}
750
736
  `, "utf8");
751
737
  await Promise.all([
752
- fs4.rm(path4.join(packageRoot, "package-lock.json"), { force: true }),
753
- fs4.rm(path4.join(packageRoot, "npm-shrinkwrap.json"), { force: true })
738
+ fs3.rm(path3.join(packageRoot, "package-lock.json"), { force: true }),
739
+ fs3.rm(path3.join(packageRoot, "npm-shrinkwrap.json"), { force: true })
754
740
  ]);
755
741
  await runNpmCommand(["install", "--ignore-scripts", "--no-audit", "--fund=false", "--package-lock=false", "--no-save", ...dependencySpecs], packageRoot);
756
742
  }
@@ -775,7 +761,7 @@ async function resolvePackageExtensionDirectory(packageRoot, sourceLabel) {
775
761
  return discovered[0];
776
762
  }
777
763
  if (discovered.length > 1) {
778
- const choices = discovered.map((entry) => path4.relative(packageRoot, entry).replaceAll(path4.sep, "/")).sort((left, right) => left.localeCompare(right));
764
+ const choices = discovered.map((entry) => path3.relative(packageRoot, entry).replaceAll(path3.sep, "/")).sort((left, right) => left.localeCompare(right));
779
765
  throw new PmCliError(`Package source "${sourceLabel}" contains multiple extension manifests. Provide an explicit extension path. Candidates: ${choices.join(", ")}`, EXIT_CODE.USAGE);
780
766
  }
781
767
  throw new PmCliError(`Unable to locate a pm extension manifest in package source "${sourceLabel}". Package installs currently activate only extension resources, so add package.json pm.extensions or an extensions/ directory. Metadata-only resources like pm.docs/pm.examples are catalog metadata and do not activate commands.`, EXIT_CODE.USAGE);
@@ -784,33 +770,33 @@ async function resolveGithubSourceDirectory(cloneDirectory, source) {
784
770
  const candidatePaths = [];
785
771
  if (source.subpath) {
786
772
  candidatePaths.push(source.subpath);
787
- candidatePaths.push(path4.posix.join(".agents/pm/extensions", source.subpath));
788
- candidatePaths.push(path4.posix.join(".custom/pm-extensions", source.subpath));
789
- candidatePaths.push(path4.posix.join(".custom/pm-extension", source.subpath));
773
+ candidatePaths.push(path3.posix.join(".agents/pm/extensions", source.subpath));
774
+ candidatePaths.push(path3.posix.join(".custom/pm-extensions", source.subpath));
775
+ candidatePaths.push(path3.posix.join(".custom/pm-extension", source.subpath));
790
776
  }
791
777
  for (const candidate of candidatePaths) {
792
- const absolute = path4.resolve(cloneDirectory, candidate);
778
+ const absolute = path3.resolve(cloneDirectory, candidate);
793
779
  if (!isPathWithinDirectory(cloneDirectory, absolute)) {
794
780
  continue;
795
781
  }
796
- if (await pathExists(path4.join(absolute, "manifest.json"))) {
782
+ if (await pathExists(path3.join(absolute, "manifest.json"))) {
797
783
  return { directory: absolute, resolved_subpath: candidate };
798
784
  }
799
785
  }
800
- if (await pathExists(path4.join(cloneDirectory, "manifest.json"))) {
786
+ if (await pathExists(path3.join(cloneDirectory, "manifest.json"))) {
801
787
  return { directory: cloneDirectory, resolved_subpath: "." };
802
788
  }
803
789
  const discoveredDirectory = await resolvePackageExtensionDirectory(cloneDirectory, source.input);
804
790
  return {
805
791
  directory: discoveredDirectory,
806
- resolved_subpath: path4.relative(cloneDirectory, discoveredDirectory).replaceAll(path4.sep, "/")
792
+ resolved_subpath: path3.relative(cloneDirectory, discoveredDirectory).replaceAll(path3.sep, "/")
807
793
  };
808
794
  }
809
795
  async function resolveInstallSource(source) {
810
796
  if (source.kind === "local") {
811
797
  let localStats;
812
798
  try {
813
- localStats = await fs4.stat(source.absolute_path);
799
+ localStats = await fs3.stat(source.absolute_path);
814
800
  } catch {
815
801
  throw new PmCliError(`Local extension source does not exist: "${source.absolute_path}".`, EXIT_CODE.NOT_FOUND);
816
802
  }
@@ -829,12 +815,12 @@ async function resolveInstallSource(source) {
829
815
  source,
830
816
  directory: resolved.directory,
831
817
  cleanup: resolved.cleanup,
832
- resolved_subpath: path4.relative(path4.dirname(resolved.directory), resolved.directory).replaceAll(path4.sep, "/"),
818
+ resolved_subpath: path3.relative(path3.dirname(resolved.directory), resolved.directory).replaceAll(path3.sep, "/"),
833
819
  npm_package: resolved.package,
834
820
  npm_version: resolved.version
835
821
  };
836
822
  }
837
- const cloneDirectory = await fs4.mkdtemp(path4.join(os.tmpdir(), "pm-extension-source-"));
823
+ const cloneDirectory = await fs3.mkdtemp(path3.join(os.tmpdir(), "pm-extension-source-"));
838
824
  const cloneArgs = ["clone", "--depth", "1"];
839
825
  if (source.ref) {
840
826
  cloneArgs.push("--branch", source.ref);
@@ -850,11 +836,11 @@ async function resolveInstallSource(source) {
850
836
  resolved_subpath: resolved.resolved_subpath,
851
837
  commit,
852
838
  cleanup: async () => {
853
- await fs4.rm(cloneDirectory, { recursive: true, force: true });
839
+ await fs3.rm(cloneDirectory, { recursive: true, force: true });
854
840
  }
855
841
  };
856
842
  } catch (error) {
857
- await fs4.rm(cloneDirectory, { recursive: true, force: true });
843
+ await fs3.rm(cloneDirectory, { recursive: true, force: true });
858
844
  throw error;
859
845
  }
860
846
  }
@@ -862,13 +848,13 @@ async function areDirectoriesEquivalent(left, right) {
862
848
  if (!await pathExists(left) || !await pathExists(right)) {
863
849
  return false;
864
850
  }
865
- const [leftRealPath, rightRealPath] = await Promise.all([fs4.realpath(left), fs4.realpath(right)]);
851
+ const [leftRealPath, rightRealPath] = await Promise.all([fs3.realpath(left), fs3.realpath(right)]);
866
852
  return leftRealPath === rightRealPath;
867
853
  }
868
854
 
869
855
  // dist/cli/commands/extension/bundled-catalog.js
870
- import fs5 from "node:fs/promises";
871
- import path5 from "node:path";
856
+ import fs4 from "node:fs/promises";
857
+ import path4 from "node:path";
872
858
  var PM_PACKAGE_ROOT_ENV = "PM_CLI_PACKAGE_ROOT";
873
859
  var LEGACY_BUNDLED_PACKAGE_ALIASES = {
874
860
  beads: {
@@ -885,7 +871,7 @@ function resolvePackageRootCandidates() {
885
871
  const candidates = [];
886
872
  const envRoot = process.env[PM_PACKAGE_ROOT_ENV];
887
873
  if (typeof envRoot === "string" && envRoot.trim().length > 0) {
888
- candidates.push(path5.resolve(envRoot.trim()));
874
+ candidates.push(path4.resolve(envRoot.trim()));
889
875
  }
890
876
  candidates.push(resolvePmPackageRootFromModule(import.meta.url, ["../../../.."]));
891
877
  return [...new Set(candidates)];
@@ -901,8 +887,8 @@ async function resolveBundledExtensionAliasSource(input) {
901
887
  return null;
902
888
  }
903
889
  for (const packageRoot2 of resolvePackageRootCandidates()) {
904
- const legacyExtensionPath = path5.join(packageRoot2, ".agents", "pm", "extensions", alias.legacy_extension_directory);
905
- if (await pathExists(path5.join(legacyExtensionPath, "manifest.json"))) {
890
+ const legacyExtensionPath = path4.join(packageRoot2, ".agents", "pm", "extensions", alias.legacy_extension_directory);
891
+ if (await pathExists(path4.join(legacyExtensionPath, "manifest.json"))) {
906
892
  return legacyExtensionPath;
907
893
  }
908
894
  }
@@ -917,17 +903,17 @@ function derivePackageAlias(packageDirectory) {
917
903
  async function collectBundledPackageEntries() {
918
904
  const entriesByAlias = /* @__PURE__ */ new Map();
919
905
  for (const packageRoot of resolvePackageRootCandidates()) {
920
- const packagesRoot = path5.join(packageRoot, "packages");
906
+ const packagesRoot = path4.join(packageRoot, "packages");
921
907
  if (!await pathExists(packagesRoot)) {
922
908
  continue;
923
909
  }
924
- const entries = await fs5.readdir(packagesRoot, { withFileTypes: true });
910
+ const entries = await fs4.readdir(packagesRoot, { withFileTypes: true });
925
911
  for (const entry of entries) {
926
912
  if (!entry.isDirectory() || !entry.name.startsWith("pm-")) {
927
913
  continue;
928
914
  }
929
- const candidateRoot = path5.join(packagesRoot, entry.name);
930
- if (!await pathExists(path5.join(candidateRoot, "package.json"))) {
915
+ const candidateRoot = path4.join(packagesRoot, entry.name);
916
+ if (!await pathExists(path4.join(candidateRoot, "package.json"))) {
931
917
  continue;
932
918
  }
933
919
  const manifest = await readPmPackageManifest(candidateRoot);
@@ -950,8 +936,8 @@ async function collectBundledPackageEntries() {
950
936
  continue;
951
937
  }
952
938
  for (const packageRoot of resolvePackageRootCandidates()) {
953
- const packagePath = path5.join(packageRoot, "packages", legacy.package_directory);
954
- if (await pathExists(path5.join(packagePath, "package.json"))) {
939
+ const packagePath = path4.join(packageRoot, "packages", legacy.package_directory);
940
+ if (await pathExists(path4.join(packagePath, "package.json"))) {
955
941
  entriesByAlias.set(alias, {
956
942
  alias,
957
943
  package_directory: legacy.package_directory,
@@ -991,7 +977,7 @@ async function buildBundledPackageCatalog(scope, global, options = {}) {
991
977
  const roots = resolveExtensionRoots(resolvePmRoot(process.cwd(), global.path), process.cwd());
992
978
  const selectedRoot = scope === "global" ? roots.global : roots.project;
993
979
  const managedStateRead = await readManagedExtensionState(selectedRoot);
994
- const installedLocations = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope).filter((entry) => entry.source.kind !== "builtin").map((entry) => path5.resolve(entry.source.location)));
980
+ const installedLocations = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope).filter((entry) => entry.source.kind !== "builtin").map((entry) => path4.resolve(entry.source.location)));
995
981
  const installedBuiltinAliases = new Set(managedStateRead.state.entries.filter((entry) => entry.scope === scope && entry.source.kind === "builtin").flatMap((entry) => [entry.source.name, entry.source.input, entry.source.location]).filter((value) => typeof value === "string" && value.trim().length > 0).map((value) => value.trim().toLowerCase()));
996
982
  const packages = [];
997
983
  for (const alias of await listBundledPackageAliases()) {
@@ -1018,7 +1004,7 @@ async function buildBundledPackageCatalog(scope, global, options = {}) {
1018
1004
  alias,
1019
1005
  bundled: true,
1020
1006
  available: true,
1021
- installed: installedBuiltinAliases.has(alias) || installedLocations.has(path5.resolve(packageRoot)),
1007
+ installed: installedBuiltinAliases.has(alias) || installedLocations.has(path4.resolve(packageRoot)),
1022
1008
  install_target: alias,
1023
1009
  install_command: `pm install ${alias} ${installScopeFlag}`,
1024
1010
  package_name: manifest.package_name,
@@ -1106,8 +1092,8 @@ function projectPackageCatalogEntry(entry, fields) {
1106
1092
  }
1107
1093
 
1108
1094
  // dist/cli/commands/extension/scaffold.js
1109
- import fs6 from "node:fs/promises";
1110
- import path6 from "node:path";
1095
+ import fs5 from "node:fs/promises";
1096
+ import path5 from "node:path";
1111
1097
  var SCAFFOLD_MANIFEST_VERSION = 1;
1112
1098
  var SCAFFOLD_PM_MIN_VERSION = "2026.5.0";
1113
1099
  function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary) {
@@ -1237,33 +1223,33 @@ function buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabula
1237
1223
  }
1238
1224
  async function scaffoldExtensionProject(target, vocabulary = "extension") {
1239
1225
  const normalizedTarget = target.trim();
1240
- const targetPath = path6.resolve(process.cwd(), normalizedTarget);
1241
- const extensionName = normalizeManagedDirectoryName(path6.basename(targetPath));
1226
+ const targetPath = path5.resolve(process.cwd(), normalizedTarget);
1227
+ const extensionName = normalizeManagedDirectoryName(path5.basename(targetPath));
1242
1228
  const commandName = `${extensionName} ping`;
1243
1229
  const scaffoldFiles = buildStarterExtensionScaffoldFiles(extensionName, commandName, vocabulary);
1244
1230
  let createdDirectory = false;
1245
1231
  if (await pathExists(targetPath)) {
1246
- const existingTargetStats = await fs6.stat(targetPath);
1232
+ const existingTargetStats = await fs5.stat(targetPath);
1247
1233
  if (!existingTargetStats.isDirectory()) {
1248
1234
  throw new PmCliError(`Scaffold target "${targetPath}" exists and is not a directory.`, EXIT_CODE.CONFLICT);
1249
1235
  }
1250
1236
  } else {
1251
- await fs6.mkdir(targetPath, { recursive: true });
1237
+ await fs5.mkdir(targetPath, { recursive: true });
1252
1238
  createdDirectory = true;
1253
1239
  }
1254
1240
  for (const [relativePath, content] of Object.entries(scaffoldFiles)) {
1255
- const absolutePath = path6.join(targetPath, relativePath);
1241
+ const absolutePath = path5.join(targetPath, relativePath);
1256
1242
  if (!await pathExists(absolutePath)) {
1257
1243
  continue;
1258
1244
  }
1259
- const existingContent = await fs6.readFile(absolutePath, "utf8");
1245
+ const existingContent = await fs5.readFile(absolutePath, "utf8");
1260
1246
  if (existingContent !== content) {
1261
1247
  throw new PmCliError(`Scaffold file "${relativePath}" already exists with different content in "${targetPath}". Choose a new target path or remove conflicting files.`, EXIT_CODE.CONFLICT);
1262
1248
  }
1263
1249
  }
1264
1250
  const files = [];
1265
1251
  for (const [relativePath, content] of Object.entries(scaffoldFiles)) {
1266
- const absolutePath = path6.join(targetPath, relativePath);
1252
+ const absolutePath = path5.join(targetPath, relativePath);
1267
1253
  if (await pathExists(absolutePath)) {
1268
1254
  files.push({
1269
1255
  path: relativePath,
@@ -1271,8 +1257,8 @@ async function scaffoldExtensionProject(target, vocabulary = "extension") {
1271
1257
  });
1272
1258
  continue;
1273
1259
  }
1274
- await fs6.mkdir(path6.dirname(absolutePath), { recursive: true });
1275
- await fs6.writeFile(absolutePath, content, "utf8");
1260
+ await fs5.mkdir(path5.dirname(absolutePath), { recursive: true });
1261
+ await fs5.writeFile(absolutePath, content, "utf8");
1276
1262
  files.push({
1277
1263
  path: relativePath,
1278
1264
  status: "created"
@@ -1426,6 +1412,7 @@ function parseRegistrationCollisionWarning(warning) {
1426
1412
  }
1427
1413
  return {
1428
1414
  code,
1415
+ surface: parts.slice(1, -4).join(":") || "global",
1429
1416
  winner: { layer: winnerLayer, name: winnerName },
1430
1417
  displaced: { layer: displacedLayer, name: displacedName }
1431
1418
  };
@@ -1451,6 +1438,58 @@ function buildRegistrationCollisionRemediation(warnings, commands) {
1451
1438
  const collisionNameText = collisionNames.length > 0 ? ` Conflicting extensions: ${collisionNames.join(", ")}.` : "";
1452
1439
  return `Extension registration collisions or handler/override overlaps detected.${collisionNameText} Single-winner surfaces can hide earlier package behavior. Deactivate one conflicting package with ${commands.deactivate}, or scope registration surfaces in extensions.policy.extension_overrides, then rerun ${commands.doctor}.`;
1453
1440
  }
1441
+ function buildRegistrationCollisionPlan(scope, warnings, extensions, options) {
1442
+ const collisions = warnings.map((warning) => parseRegistrationCollisionWarning(warning)).filter((entry) => entry !== null).sort((left, right) => `${left.code}:${left.surface}:${left.winner.name}:${left.displaced.name}`.localeCompare(`${right.code}:${right.surface}:${right.winner.name}:${right.displaced.name}`));
1443
+ if (collisions.length === 0) {
1444
+ return void 0;
1445
+ }
1446
+ const scopeFlag = scope === "global" ? "--global" : "--project";
1447
+ const deactivatePrefix = lifecycleFlagCommand(options, "deactivate");
1448
+ const doctorCommand = `${lifecycleFlagCommand(options, "doctor")} ${scopeFlag} --detail deep --trace`;
1449
+ const extensionByName = new Map(extensions.map((entry) => [normalizeExtensionNameForMatch(entry.name), entry]));
1450
+ const affectedByName = /* @__PURE__ */ new Map();
1451
+ for (const collision of collisions) {
1452
+ for (const name of [collision.winner.name, collision.displaced.name]) {
1453
+ const normalizedName = normalizeExtensionNameForMatch(name);
1454
+ affectedByName.set(normalizedName, (affectedByName.get(normalizedName) ?? 0) + 1);
1455
+ }
1456
+ }
1457
+ const remediationCandidates = [...affectedByName.entries()].map(([normalizedName, affectedCollisions]) => {
1458
+ const extension = extensionByName.get(normalizedName);
1459
+ const extensionName = extension?.name ?? normalizedName;
1460
+ const commandPaths = extension?.command_paths ?? [];
1461
+ const actionPaths = extension?.action_paths ?? [];
1462
+ return {
1463
+ action: "deactivate",
1464
+ extension: extensionName,
1465
+ command: `${deactivatePrefix} ${extensionName} ${scopeFlag}`,
1466
+ affected_collisions: affectedCollisions,
1467
+ feature_loss: {
1468
+ command_paths: [...commandPaths].sort((left, right) => left.localeCompare(right)),
1469
+ action_paths: [...actionPaths].sort((left, right) => left.localeCompare(right))
1470
+ }
1471
+ };
1472
+ }).sort((left, right) => {
1473
+ const affectedDelta = right.affected_collisions - left.affected_collisions;
1474
+ if (affectedDelta !== 0) {
1475
+ return affectedDelta;
1476
+ }
1477
+ const leftSurfaceCount = left.feature_loss.command_paths.length + left.feature_loss.action_paths.length;
1478
+ const rightSurfaceCount = right.feature_loss.command_paths.length + right.feature_loss.action_paths.length;
1479
+ if (leftSurfaceCount !== rightSurfaceCount) {
1480
+ return leftSurfaceCount - rightSurfaceCount;
1481
+ }
1482
+ return left.extension.localeCompare(right.extension);
1483
+ });
1484
+ return {
1485
+ status: "conflicts_detected",
1486
+ collision_count: collisions.length,
1487
+ extension_count: affectedByName.size,
1488
+ next_best_command: doctorCommand,
1489
+ collisions,
1490
+ remediation_candidates: remediationCandidates
1491
+ };
1492
+ }
1454
1493
  function classifyDoctorLoadFailureWarnings(loadFailures) {
1455
1494
  const warnings = [];
1456
1495
  for (const failure of loadFailures) {
@@ -1553,6 +1592,7 @@ function buildExtensionTriageSummary(scope, warnings, extensions, options = {})
1553
1592
  remediation.push("Extension governance policy warnings detected. Review settings.extensions.policy mode and allow/block lists to confirm intended capabilities and registration surfaces.");
1554
1593
  }
1555
1594
  }
1595
+ const collisionPlan = buildRegistrationCollisionPlan(scope, normalizedWarnings, extensions, options);
1556
1596
  if (updateHealthPartial) {
1557
1597
  remediation.push(`Update-check coverage is partial because unmanaged extensions need adoption. Adopt existing installs via ${lifecycleFlagCommand(options, "manage")} ${scopeFlag} --fix-managed-state (or ${lifecycleFlagCommand(options, "adopt-all")} ${scopeFlag}, ${lifecycleFlagCommand(options, "adopt")} <name> ${scopeFlag}, or reinstall via ${lifecycleFlagCommand(options, "install")} ${scopeFlag} <source>).`);
1558
1598
  } else if (skippedUnmanagedTotal > 0) {
@@ -1591,7 +1631,8 @@ function buildExtensionTriageSummary(scope, warnings, extensions, options = {})
1591
1631
  update_check_status_totals: updateCheckStatusTotals,
1592
1632
  update_check_failed_total: updateCheckFailedTotal,
1593
1633
  top_warnings: effectiveWarnings.slice(0, 8),
1594
- remediation
1634
+ remediation,
1635
+ ...collisionPlan ? { collision_plan: collisionPlan } : {}
1595
1636
  };
1596
1637
  }
1597
1638
  function parseDoctorDetailMode(raw) {
@@ -1760,11 +1801,11 @@ function sleep(ms) {
1760
1801
  setTimeout(resolve, ms);
1761
1802
  });
1762
1803
  }
1763
- async function copyExtensionDirectoryForInstall(sourceDirectory, destinationDirectory, copyDirectory = fs7.cp) {
1804
+ async function copyExtensionDirectoryForInstall(sourceDirectory, destinationDirectory, copyDirectory = fs6.cp) {
1764
1805
  for (let attempt = 1; attempt <= EXTENSION_INSTALL_COPY_ATTEMPTS; attempt += 1) {
1765
1806
  try {
1766
1807
  if (await pathExists(destinationDirectory)) {
1767
- await fs7.rm(destinationDirectory, { recursive: true, force: true });
1808
+ await fs6.rm(destinationDirectory, { recursive: true, force: true });
1768
1809
  }
1769
1810
  await copyExtensionDirectoryWithoutSelfNesting(sourceDirectory, destinationDirectory, copyDirectory);
1770
1811
  return;
@@ -1777,8 +1818,8 @@ async function copyExtensionDirectoryForInstall(sourceDirectory, destinationDire
1777
1818
  }
1778
1819
  }
1779
1820
  async function copyExtensionDirectoryWithoutSelfNesting(sourceDirectory, destinationDirectory, copyDirectory) {
1780
- const resolvedSource = path7.resolve(sourceDirectory);
1781
- const resolvedDestination = path7.resolve(destinationDirectory);
1821
+ const resolvedSource = path6.resolve(sourceDirectory);
1822
+ const resolvedDestination = path6.resolve(destinationDirectory);
1782
1823
  if (resolvedSource === resolvedDestination) {
1783
1824
  return;
1784
1825
  }
@@ -1786,34 +1827,34 @@ async function copyExtensionDirectoryWithoutSelfNesting(sourceDirectory, destina
1786
1827
  await copyDirectory(sourceDirectory, destinationDirectory, { recursive: true, force: true });
1787
1828
  return;
1788
1829
  }
1789
- const stagingRoot = await fs7.mkdtemp(path7.join(os2.tmpdir(), "pm-extension-copy-"));
1790
- const stagedDirectory = path7.join(stagingRoot, "extension");
1830
+ const stagingRoot = await fs6.mkdtemp(path6.join(os2.tmpdir(), "pm-extension-copy-"));
1831
+ const stagedDirectory = path6.join(stagingRoot, "extension");
1791
1832
  try {
1792
1833
  await copyDirectory(sourceDirectory, stagedDirectory, { recursive: true, force: true });
1793
1834
  await copyDirectory(stagedDirectory, destinationDirectory, { recursive: true, force: true });
1794
1835
  } finally {
1795
- await fs7.rm(stagingRoot, { recursive: true, force: true });
1836
+ await fs6.rm(stagingRoot, { recursive: true, force: true });
1796
1837
  }
1797
1838
  }
1798
1839
  async function withExtensionInstallLock(settingsRoot, destinationDirectoryName, run) {
1799
- const lockRoot = path7.join(settingsRoot, "runtime", "extension-install-locks");
1800
- const lockPath = path7.join(lockRoot, `${destinationDirectoryName}.lock`);
1801
- await fs7.mkdir(lockRoot, { recursive: true });
1840
+ const lockRoot = path6.join(settingsRoot, "runtime", "extension-install-locks");
1841
+ const lockPath = path6.join(lockRoot, `${destinationDirectoryName}.lock`);
1842
+ await fs6.mkdir(lockRoot, { recursive: true });
1802
1843
  let acquired = false;
1803
1844
  for (let attempt = 1; attempt <= EXTENSION_INSTALL_LOCK_ATTEMPTS; attempt += 1) {
1804
1845
  try {
1805
- await fs7.mkdir(lockPath);
1846
+ await fs6.mkdir(lockPath);
1806
1847
  acquired = true;
1807
- await fs7.writeFile(path7.join(lockPath, "owner.json"), `${JSON.stringify({ pid: process.pid, created_at: nowIso(), destination: destinationDirectoryName }, null, 2)}
1848
+ await fs6.writeFile(path6.join(lockPath, "owner.json"), `${JSON.stringify({ pid: process.pid, created_at: nowIso(), destination: destinationDirectoryName }, null, 2)}
1808
1849
  `, "utf8");
1809
1850
  break;
1810
1851
  } catch (error) {
1811
1852
  if (!isErrnoCode(error, "EEXIST")) {
1812
1853
  throw error;
1813
1854
  }
1814
- const stat = await fs7.stat(lockPath).catch(() => null);
1855
+ const stat = await fs6.stat(lockPath).catch(() => null);
1815
1856
  if (stat && Date.now() - stat.mtimeMs > EXTENSION_INSTALL_LOCK_STALE_MS) {
1816
- await fs7.rm(lockPath, { recursive: true, force: true });
1857
+ await fs6.rm(lockPath, { recursive: true, force: true });
1817
1858
  continue;
1818
1859
  }
1819
1860
  await sleep(EXTENSION_INSTALL_LOCK_DELAY_MS);
@@ -1825,7 +1866,7 @@ async function withExtensionInstallLock(settingsRoot, destinationDirectoryName,
1825
1866
  try {
1826
1867
  return await run();
1827
1868
  } finally {
1828
- await fs7.rm(lockPath, { recursive: true, force: true }).catch(() => void 0);
1869
+ await fs6.rm(lockPath, { recursive: true, force: true }).catch(() => void 0);
1829
1870
  }
1830
1871
  }
1831
1872
  async function resolveInstalledExtensionCandidate(installed, extensionTarget) {
@@ -2003,7 +2044,7 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
2003
2044
  warnings: []
2004
2045
  };
2005
2046
  }
2006
- const entries = await fs7.readdir(extensionsRoot, { withFileTypes: true });
2047
+ const entries = await fs6.readdir(extensionsRoot, { withFileTypes: true });
2007
2048
  const directories = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort((left, right) => left.localeCompare(right));
2008
2049
  const managedByName = /* @__PURE__ */ new Map();
2009
2050
  const managedByDirectory = /* @__PURE__ */ new Map();
@@ -2014,8 +2055,8 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
2014
2055
  const warnings = [];
2015
2056
  const summaries = [];
2016
2057
  for (const directoryName of directories) {
2017
- const extensionDirectory = path7.join(extensionsRoot, directoryName);
2018
- const manifestPath = path7.join(extensionDirectory, "manifest.json");
2058
+ const extensionDirectory = path6.join(extensionsRoot, directoryName);
2059
+ const manifestPath = path6.join(extensionDirectory, "manifest.json");
2019
2060
  if (!await pathExists(manifestPath)) {
2020
2061
  warnings.push(`extension_manifest_missing:${scope}:${directoryName}`);
2021
2062
  const managedEntry2 = managedByDirectory.get(normalizeExtensionNameForMatch(directoryName));
@@ -2044,7 +2085,7 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
2044
2085
  }
2045
2086
  let rawManifest;
2046
2087
  try {
2047
- rawManifest = JSON.parse(await fs7.readFile(manifestPath, "utf8"));
2088
+ rawManifest = JSON.parse(await fs6.readFile(manifestPath, "utf8"));
2048
2089
  } catch {
2049
2090
  warnings.push(`extension_manifest_invalid_json:${scope}:${directoryName}`);
2050
2091
  continue;
@@ -2082,6 +2123,52 @@ async function listInstalledExtensions(extensionsRoot, scope, settings, state) {
2082
2123
  warnings: warnings.sort((left, right) => left.localeCompare(right))
2083
2124
  };
2084
2125
  }
2126
+ function summarizeRuntimeCommandPathsForExtension(extensionName, installed) {
2127
+ const normalizedName = normalizeExtensionNameForMatch(extensionName);
2128
+ const entry = installed.find((candidate) => normalizeExtensionNameForMatch(candidate.name) === normalizedName);
2129
+ return {
2130
+ command_paths: [...entry?.command_paths ?? []].sort((left, right) => left.localeCompare(right)),
2131
+ action_paths: [...entry?.action_paths ?? []].sort((left, right) => left.localeCompare(right))
2132
+ };
2133
+ }
2134
+ function resolveCommandDiscoveryPackageName(extensionName, source) {
2135
+ if (source.kind === "npm" && typeof source.package === "string" && source.package.trim().length > 0) {
2136
+ return source.package.trim();
2137
+ }
2138
+ if (source.kind === "builtin" && typeof source.name === "string" && source.name.trim().length > 0) {
2139
+ return source.name.trim();
2140
+ }
2141
+ return extensionName;
2142
+ }
2143
+ function buildInstallCommandDiscovery(extensionName, source, commandSummary) {
2144
+ const helpCommands = commandSummary.command_paths.map((commandPath) => `pm ${commandPath} --help`);
2145
+ return {
2146
+ package_name: resolveCommandDiscoveryPackageName(extensionName, source),
2147
+ extension_name: extensionName,
2148
+ command_paths: commandSummary.command_paths,
2149
+ action_paths: commandSummary.action_paths,
2150
+ help_commands: helpCommands,
2151
+ next_steps: commandSummary.command_paths.length > 0 ? helpCommands : ["Run pm package doctor --project --detail deep if expected package commands are missing."]
2152
+ };
2153
+ }
2154
+ async function probeRuntimeCommandPathsForInstall(pmRoot, settings, refreshedInstalled, global) {
2155
+ const loadResult = await loadExtensions({
2156
+ pmRoot,
2157
+ settings,
2158
+ cwd: process.cwd(),
2159
+ noExtensions: global.noExtensions === true,
2160
+ reload_token: nextExtensionReloadToken(),
2161
+ cache_bust: true
2162
+ });
2163
+ const activationResult = await activateExtensions({
2164
+ ...loadResult,
2165
+ loaded: loadResult.loaded
2166
+ });
2167
+ return {
2168
+ installed: applyDoctorRuntimeActivationState(refreshedInstalled, loadResult, activationResult),
2169
+ warnings: [...loadResult.warnings, ...activationResult.warnings]
2170
+ };
2171
+ }
2085
2172
  async function checkGithubUpdate(source) {
2086
2173
  const checkedAt = nowIso();
2087
2174
  if (source.kind !== "github" || !source.repository) {
@@ -2143,7 +2230,7 @@ async function adoptUnmanagedExtensions(extensionsRoot, scope, installedExtensio
2143
2230
  let nextState = state;
2144
2231
  const adoptedEntries = [];
2145
2232
  for (const candidate of sortedCandidates) {
2146
- const extensionDirectory = path7.join(extensionsRoot, candidate.directory);
2233
+ const extensionDirectory = path6.join(extensionsRoot, candidate.directory);
2147
2234
  const validated = await validateExtensionDirectory(extensionDirectory);
2148
2235
  const now = nowIso();
2149
2236
  const sourceRecord = {
@@ -2400,6 +2487,9 @@ async function runExtension(target, options, global) {
2400
2487
  destination_path: entry.result.details.destination_path,
2401
2488
  activated: entry.result.details.activated,
2402
2489
  settings_changed: entry.result.details.settings_changed,
2490
+ command_paths: entry.result.details.command_paths,
2491
+ action_paths: entry.result.details.action_paths,
2492
+ command_discovery: entry.result.details.command_discovery,
2403
2493
  warnings: entry.result.warnings
2404
2494
  }))
2405
2495
  });
@@ -2419,10 +2509,10 @@ async function runExtension(target, options, global) {
2419
2509
  const settings = await readSettings(resolvedRoots.settings_root);
2420
2510
  const managedStateRead = await readManagedExtensionState(resolvedRoots.selected_root);
2421
2511
  warnings.push(...managedStateRead.warnings);
2422
- const destinationDirectory = path7.join(resolvedRoots.selected_root, destinationDirectoryName);
2512
+ const destinationDirectory = path6.join(resolvedRoots.selected_root, destinationDirectoryName);
2423
2513
  const destinationExists = await pathExists(destinationDirectory);
2424
2514
  const installInPlace = await areDirectoriesEquivalent(validated.directory, destinationDirectory);
2425
- await fs7.mkdir(resolvedRoots.selected_root, { recursive: true });
2515
+ await fs6.mkdir(resolvedRoots.selected_root, { recursive: true });
2426
2516
  if (!installInPlace) {
2427
2517
  await copyExtensionDirectoryForInstall(validated.directory, destinationDirectory);
2428
2518
  }
@@ -2471,6 +2561,11 @@ async function runExtension(target, options, global) {
2471
2561
  if (activationChanged) {
2472
2562
  await writeSettings(resolvedRoots.settings_root, settings, "settings:write");
2473
2563
  }
2564
+ const refreshedInstalled = await listInstalledExtensions(resolvedRoots.selected_root, scope, settings, managedState);
2565
+ warnings.push(...refreshedInstalled.warnings);
2566
+ const runtimeProbe = await probeRuntimeCommandPathsForInstall(resolvedRoots.pm_root, settings, refreshedInstalled.extensions, global);
2567
+ warnings.push(...runtimeProbe.warnings);
2568
+ const commandSummary = summarizeRuntimeCommandPathsForExtension(validated.manifest.name, runtimeProbe.installed);
2474
2569
  return withResult({
2475
2570
  extension: {
2476
2571
  name: validated.manifest.name,
@@ -2484,7 +2579,10 @@ async function runExtension(target, options, global) {
2484
2579
  overwritten: destinationExists && !installInPlace,
2485
2580
  installed_in_place: installInPlace,
2486
2581
  activated: true,
2487
- settings_changed: activationChanged
2582
+ settings_changed: activationChanged,
2583
+ command_paths: commandSummary.command_paths,
2584
+ action_paths: commandSummary.action_paths,
2585
+ command_discovery: buildInstallCommandDiscovery(validated.manifest.name, sourceRecord, commandSummary)
2488
2586
  });
2489
2587
  });
2490
2588
  } finally {
@@ -2552,7 +2650,7 @@ async function runExtension(target, options, global) {
2552
2650
  }
2553
2651
  });
2554
2652
  }
2555
- const extensionDirectory = path7.join(resolvedRoots.selected_root, candidate.directory);
2653
+ const extensionDirectory = path6.join(resolvedRoots.selected_root, candidate.directory);
2556
2654
  const validated = await validateExtensionDirectory(extensionDirectory);
2557
2655
  const now = nowIso();
2558
2656
  const sourceRecord = githubOption === void 0 ? {
@@ -2617,8 +2715,8 @@ async function runExtension(target, options, global) {
2617
2715
  if (!candidate) {
2618
2716
  throw new PmCliError(`Installed extension "${extensionTarget}" was not found in ${scope} scope.`, EXIT_CODE.NOT_FOUND);
2619
2717
  }
2620
- const destinationDirectory = path7.join(resolvedRoots.selected_root, candidate.directory);
2621
- await fs7.rm(destinationDirectory, { recursive: true, force: true });
2718
+ const destinationDirectory = path6.join(resolvedRoots.selected_root, candidate.directory);
2719
+ await fs6.rm(destinationDirectory, { recursive: true, force: true });
2622
2720
  const updatedState = {
2623
2721
  ...managedStateRead.state,
2624
2722
  updated_at: nowIso(),
@@ -2973,8 +3071,6 @@ async function runExtension(target, options, global) {
2973
3071
  }
2974
3072
 
2975
3073
  export {
2976
- parseExtensionManifest,
2977
- validateExtensionDirectory,
2978
3074
  resolveManagedExtensionStatePath,
2979
3075
  readManagedExtensionState,
2980
3076
  writeManagedExtensionState,
@@ -2983,6 +3079,6 @@ export {
2983
3079
  copyExtensionDirectoryForInstall,
2984
3080
  runExtension
2985
3081
  };
2986
- //# sourceMappingURL=chunk-TPH5XEVD.js.map
3082
+ //# sourceMappingURL=chunk-XYNT7UFP.js.map
2987
3083
 
2988
- //# debugId=e39bfbe4-484e-5544-affb-f1f6fbd63030
3084
+ //# debugId=bbca734a-ed22-5880-ac8f-334fdbfd62ae