@unbrained/pm-cli 2026.6.24 → 2026.7.1

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 (744) hide show
  1. package/AGENTS.md +2 -0
  2. package/CHANGELOG.md +113 -1
  3. package/CONTRIBUTING.md +30 -0
  4. package/README.md +16 -3
  5. package/dist/cli/bootstrap-args.js +89 -79
  6. package/dist/cli/bootstrap-args.js.map +1 -1
  7. package/dist/cli/commander-usage.js +3 -3
  8. package/dist/cli/commander-usage.js.map +1 -1
  9. package/dist/cli/commands/aggregate.js +8 -7
  10. package/dist/cli/commands/aggregate.js.map +1 -1
  11. package/dist/cli/commands/calendar.js +63 -62
  12. package/dist/cli/commands/calendar.js.map +1 -1
  13. package/dist/cli/commands/close.d.ts +2 -4
  14. package/dist/cli/commands/close.js +5 -17
  15. package/dist/cli/commands/close.js.map +1 -1
  16. package/dist/cli/commands/completion.js +158 -9
  17. package/dist/cli/commands/completion.js.map +1 -1
  18. package/dist/cli/commands/config.d.ts +1 -1
  19. package/dist/cli/commands/config.js +2 -2
  20. package/dist/cli/commands/config.js.map +1 -1
  21. package/dist/cli/commands/context.d.ts +31 -4
  22. package/dist/cli/commands/context.js +33 -10
  23. package/dist/cli/commands/context.js.map +1 -1
  24. package/dist/cli/commands/contracts.js +48 -8
  25. package/dist/cli/commands/contracts.js.map +1 -1
  26. package/dist/cli/commands/create.d.ts +1 -6
  27. package/dist/cli/commands/create.js +491 -587
  28. package/dist/cli/commands/create.js.map +1 -1
  29. package/dist/cli/commands/extension/bundled-catalog.js +59 -46
  30. package/dist/cli/commands/extension/bundled-catalog.js.map +1 -1
  31. package/dist/cli/commands/extension/describe.d.ts +15 -0
  32. package/dist/cli/commands/extension/describe.js +48 -2
  33. package/dist/cli/commands/extension/describe.js.map +1 -1
  34. package/dist/cli/commands/extension/doctor.js +129 -75
  35. package/dist/cli/commands/extension/doctor.js.map +1 -1
  36. package/dist/cli/commands/extension/install-sources.js +37 -7
  37. package/dist/cli/commands/extension/install-sources.js.map +1 -1
  38. package/dist/cli/commands/extension/managed-state.js +101 -57
  39. package/dist/cli/commands/extension/managed-state.js.map +1 -1
  40. package/dist/cli/commands/extension/scaffold.d.ts +38 -8
  41. package/dist/cli/commands/extension/scaffold.js +1956 -242
  42. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  43. package/dist/cli/commands/extension.d.ts +28 -3
  44. package/dist/cli/commands/extension.js +1181 -880
  45. package/dist/cli/commands/extension.js.map +1 -1
  46. package/dist/cli/commands/index.d.ts +3 -1
  47. package/dist/cli/commands/index.js +5 -3
  48. package/dist/cli/commands/index.js.map +1 -1
  49. package/dist/cli/commands/item-filter-options.d.ts +63 -0
  50. package/dist/cli/commands/item-filter-options.js +10 -0
  51. package/dist/cli/commands/item-filter-options.js.map +1 -0
  52. package/dist/cli/commands/legacy-none-tokens.d.ts +14 -0
  53. package/dist/cli/commands/legacy-none-tokens.js +31 -2
  54. package/dist/cli/commands/legacy-none-tokens.js.map +1 -1
  55. package/dist/cli/commands/linked-artifacts.d.ts +7 -0
  56. package/dist/cli/commands/linked-artifacts.js +12 -2
  57. package/dist/cli/commands/linked-artifacts.js.map +1 -1
  58. package/dist/cli/commands/list-filter-shared.js +55 -48
  59. package/dist/cli/commands/list-filter-shared.js.map +1 -1
  60. package/dist/cli/commands/list.d.ts +16 -39
  61. package/dist/cli/commands/list.js +127 -118
  62. package/dist/cli/commands/list.js.map +1 -1
  63. package/dist/cli/commands/next.d.ts +98 -0
  64. package/dist/cli/commands/next.js +304 -0
  65. package/dist/cli/commands/next.js.map +1 -0
  66. package/dist/cli/commands/profile.d.ts +208 -0
  67. package/dist/cli/commands/profile.js +418 -0
  68. package/dist/cli/commands/profile.js.map +1 -0
  69. package/dist/cli/commands/repeatable-metadata-parsers.js +12 -13
  70. package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -1
  71. package/dist/cli/commands/schema.d.ts +7 -0
  72. package/dist/cli/commands/schema.js +9 -3
  73. package/dist/cli/commands/schema.js.map +1 -1
  74. package/dist/cli/commands/search.d.ts +2 -39
  75. package/dist/cli/commands/search.js +196 -172
  76. package/dist/cli/commands/search.js.map +1 -1
  77. package/dist/cli/commands/shared-unset-fields.d.ts +30 -0
  78. package/dist/cli/commands/shared-unset-fields.js +161 -0
  79. package/dist/cli/commands/shared-unset-fields.js.map +1 -0
  80. package/dist/cli/commands/stats.js +15 -3
  81. package/dist/cli/commands/stats.js.map +1 -1
  82. package/dist/cli/commands/test.js +115 -125
  83. package/dist/cli/commands/test.js.map +1 -1
  84. package/dist/cli/commands/update.d.ts +1 -6
  85. package/dist/cli/commands/update.js +37 -232
  86. package/dist/cli/commands/update.js.map +1 -1
  87. package/dist/cli/commands/validate.js +20 -5
  88. package/dist/cli/commands/validate.js.map +1 -1
  89. package/dist/cli/extension-command-options.js +48 -21
  90. package/dist/cli/extension-command-options.js.map +1 -1
  91. package/dist/cli/help-content.js +26 -2
  92. package/dist/cli/help-content.js.map +1 -1
  93. package/dist/cli/help-json-payload.js +3 -3
  94. package/dist/cli/help-json-payload.js.map +1 -1
  95. package/dist/cli/main.js +27 -12
  96. package/dist/cli/main.js.map +1 -1
  97. package/dist/cli/register-list-query.js +42 -3
  98. package/dist/cli/register-list-query.js.map +1 -1
  99. package/dist/cli/register-mutation.js +86 -2
  100. package/dist/cli/register-mutation.js.map +1 -1
  101. package/dist/cli/register-setup.js +67 -6
  102. package/dist/cli/register-setup.js.map +1 -1
  103. package/dist/cli/registration-helpers.d.ts +9 -1
  104. package/dist/cli/registration-helpers.js +149 -123
  105. package/dist/cli/registration-helpers.js.map +1 -1
  106. package/dist/cli-bundle/chunks/activity-AW6XVFH6.js +16 -0
  107. package/dist/cli-bundle/chunks/{activity-N7RVTLBQ.js → activity-DBLQVIP6.js} +9 -11
  108. package/dist/cli-bundle/chunks/{aggregate-63NWNIBR.js → aggregate-JTEF4BP7.js} +17 -18
  109. package/dist/cli-bundle/chunks/aggregate-JTEF4BP7.js.map +1 -0
  110. package/dist/cli-bundle/chunks/{aggregate-YHCYX2EV.js → aggregate-SDF7DUOD.js} +16 -17
  111. package/dist/cli-bundle/chunks/aggregate-SDF7DUOD.js.map +7 -0
  112. package/dist/cli-bundle/chunks/{append-VLQQDHMJ.js → append-LOVPGVPT.js} +8 -10
  113. package/dist/cli-bundle/chunks/{append-VLQQDHMJ.js.map → append-LOVPGVPT.js.map} +1 -1
  114. package/dist/cli-bundle/chunks/{append-PUKREFV5.js → append-QCFJSDFL.js} +10 -12
  115. package/dist/cli-bundle/chunks/{append-PUKREFV5.js.map → append-QCFJSDFL.js.map} +1 -1
  116. package/dist/cli-bundle/chunks/{chunk-ABYCA5VX.js → chunk-22WKIL3H.js} +9 -11
  117. package/dist/cli-bundle/chunks/{chunk-ABYCA5VX.js.map → chunk-22WKIL3H.js.map} +1 -1
  118. package/dist/cli-bundle/chunks/{chunk-A66VYUOV.js → chunk-2466X6E4.js} +9 -11
  119. package/dist/cli-bundle/chunks/{chunk-A66VYUOV.js.map → chunk-2466X6E4.js.map} +1 -1
  120. package/dist/cli-bundle/chunks/{chunk-F32L4HR6.js → chunk-27BXPBAY.js} +3 -3
  121. package/dist/cli-bundle/chunks/{schema-QO5I4FBL.js → chunk-2D4HATP2.js} +136 -66
  122. package/dist/cli-bundle/chunks/chunk-2D4HATP2.js.map +1 -0
  123. package/dist/cli-bundle/chunks/{chunk-J7I4C5ZB.js → chunk-3J6JRJ3I.js} +153 -125
  124. package/dist/cli-bundle/chunks/chunk-3J6JRJ3I.js.map +7 -0
  125. package/dist/cli-bundle/chunks/{chunk-OHDQNKJB.js → chunk-3K2M5OYU.js} +106 -34
  126. package/dist/cli-bundle/chunks/chunk-3K2M5OYU.js.map +7 -0
  127. package/dist/cli-bundle/chunks/{chunk-XVYKWZNL.js → chunk-3S2KT7NG.js} +127 -127
  128. package/dist/cli-bundle/chunks/chunk-3S2KT7NG.js.map +7 -0
  129. package/dist/cli-bundle/chunks/{chunk-5BBEWX6C.js → chunk-3VGN2UWE.js} +2 -2
  130. package/dist/cli-bundle/chunks/{chunk-N5B6WZC5.js → chunk-3XZCOZ5J.js} +115 -123
  131. package/dist/cli-bundle/chunks/chunk-3XZCOZ5J.js.map +1 -0
  132. package/dist/cli-bundle/chunks/chunk-4A3BJ675.js +799 -0
  133. package/dist/cli-bundle/chunks/chunk-4A3BJ675.js.map +1 -0
  134. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js +87 -0
  135. package/dist/cli-bundle/chunks/chunk-4BU75MF4.js.map +7 -0
  136. package/dist/cli-bundle/chunks/{chunk-HZF5RLKX.js → chunk-4DSGXSBL.js} +5 -7
  137. package/dist/cli-bundle/chunks/{chunk-HZF5RLKX.js.map → chunk-4DSGXSBL.js.map} +1 -1
  138. package/dist/cli-bundle/chunks/{chunk-JV27C7OZ.js → chunk-4DUVCVLZ.js} +4 -6
  139. package/dist/cli-bundle/chunks/{chunk-JV27C7OZ.js.map → chunk-4DUVCVLZ.js.map} +1 -1
  140. package/dist/cli-bundle/chunks/{chunk-IAP5KYBQ.js → chunk-4XOIEKSD.js} +563 -506
  141. package/dist/cli-bundle/chunks/chunk-4XOIEKSD.js.map +1 -0
  142. package/dist/cli-bundle/chunks/{context-5LB7UGKE.js → chunk-55SNVXRQ.js} +79 -82
  143. package/dist/cli-bundle/chunks/chunk-55SNVXRQ.js.map +7 -0
  144. package/dist/cli-bundle/chunks/{chunk-BFFO3AIB.js → chunk-5CGRF3L5.js} +128 -128
  145. package/dist/cli-bundle/chunks/chunk-5CGRF3L5.js.map +1 -0
  146. package/dist/cli-bundle/chunks/{chunk-JKL6HRMV.js → chunk-5QFDBI4F.js} +1260 -1046
  147. package/dist/cli-bundle/chunks/chunk-5QFDBI4F.js.map +7 -0
  148. package/dist/cli-bundle/chunks/{chunk-LU36E6GU.js → chunk-64HNBBFQ.js} +8 -12
  149. package/dist/cli-bundle/chunks/{chunk-LU36E6GU.js.map → chunk-64HNBBFQ.js.map} +1 -1
  150. package/dist/cli-bundle/chunks/chunk-6AQZPVHQ.js +2444 -0
  151. package/dist/cli-bundle/chunks/chunk-6AQZPVHQ.js.map +1 -0
  152. package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js +17 -0
  153. package/dist/cli-bundle/chunks/chunk-7M2HAZEB.js.map +7 -0
  154. package/dist/cli-bundle/chunks/{chunk-VSAABFGQ.js → chunk-7R4QEMZZ.js} +1490 -734
  155. package/dist/cli-bundle/chunks/chunk-7R4QEMZZ.js.map +1 -0
  156. package/dist/cli-bundle/chunks/{chunk-M6TUBOGW.js → chunk-A7FPBAQS.js} +19 -12
  157. package/dist/cli-bundle/chunks/chunk-A7FPBAQS.js.map +1 -0
  158. package/dist/cli-bundle/chunks/{chunk-GQYJEEFX.js → chunk-AVEE5EHK.js} +53 -54
  159. package/dist/cli-bundle/chunks/chunk-AVEE5EHK.js.map +1 -0
  160. package/dist/cli-bundle/chunks/{chunk-FMWW2JDU.js → chunk-AXIDKKAT.js} +2 -2
  161. package/dist/cli-bundle/chunks/{chunk-TIM4OD74.js → chunk-BDTISOSD.js} +2 -2
  162. package/dist/cli-bundle/chunks/{chunk-C4C3EJCJ.js → chunk-BHO33VBQ.js} +509 -363
  163. package/dist/cli-bundle/chunks/chunk-BHO33VBQ.js.map +7 -0
  164. package/dist/cli-bundle/chunks/{chunk-6W3Y65PL.js → chunk-BZCEN4JA.js} +198 -177
  165. package/dist/cli-bundle/chunks/chunk-BZCEN4JA.js.map +7 -0
  166. package/dist/cli-bundle/chunks/{chunk-RRP6D345.js → chunk-CF7RL6FR.js} +12 -16
  167. package/dist/cli-bundle/chunks/{chunk-RRP6D345.js.map → chunk-CF7RL6FR.js.map} +1 -1
  168. package/dist/cli-bundle/chunks/{chunk-HC2S36NB.js → chunk-CWFNTKQJ.js} +154 -126
  169. package/dist/cli-bundle/chunks/chunk-CWFNTKQJ.js.map +1 -0
  170. package/dist/cli-bundle/chunks/chunk-CZVISY5A.js +87 -0
  171. package/dist/cli-bundle/chunks/chunk-CZVISY5A.js.map +7 -0
  172. package/dist/cli-bundle/chunks/{chunk-CZIFFMZI.js → chunk-DDPTYJIM.js} +2 -2
  173. package/dist/cli-bundle/chunks/{chunk-AYPQUFCX.js → chunk-EJUDVUYZ.js} +3 -3
  174. package/dist/cli-bundle/chunks/{chunk-EOGBMLCE.js → chunk-EVMTBV6V.js} +3 -3
  175. package/dist/cli-bundle/chunks/{chunk-RAWA3Y7O.js → chunk-FFMQB7WR.js} +199 -178
  176. package/dist/cli-bundle/chunks/chunk-FFMQB7WR.js.map +1 -0
  177. package/dist/cli-bundle/chunks/{chunk-CG3KP6I5.js → chunk-G7I7DEZA.js} +4 -4
  178. package/dist/cli-bundle/chunks/{chunk-MEXZ5XUM.js → chunk-GJ326ZKX.js} +53 -54
  179. package/dist/cli-bundle/chunks/chunk-GJ326ZKX.js.map +7 -0
  180. package/dist/cli-bundle/chunks/chunk-HPPFYYOV.js +119 -0
  181. package/dist/cli-bundle/chunks/chunk-HPPFYYOV.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{chunk-OF7V47P3.js → chunk-HXTQJXWT.js} +2172 -2146
  183. package/dist/cli-bundle/chunks/chunk-HXTQJXWT.js.map +1 -0
  184. package/dist/cli-bundle/chunks/{chunk-F4BNR2IN.js → chunk-HYTGA6GI.js} +3 -3
  185. package/dist/cli-bundle/chunks/{chunk-2WCYE3IF.js → chunk-HZZEHPRG.js} +2 -2
  186. package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js +14 -0
  187. package/dist/cli-bundle/chunks/chunk-IBMFIKVS.js.map +1 -0
  188. package/dist/cli-bundle/chunks/{chunk-YV2OSAMS.js → chunk-IJYK2T43.js} +2 -2
  189. package/dist/cli-bundle/chunks/{chunk-4XDGYFHL.js → chunk-IPYBJWTE.js} +10 -14
  190. package/dist/cli-bundle/chunks/{chunk-4XDGYFHL.js.map → chunk-IPYBJWTE.js.map} +1 -1
  191. package/dist/cli-bundle/chunks/{chunk-6EBNFQOR.js → chunk-IZBR4NRW.js} +10 -14
  192. package/dist/cli-bundle/chunks/{chunk-6EBNFQOR.js.map → chunk-IZBR4NRW.js.map} +1 -1
  193. package/dist/cli-bundle/chunks/{chunk-VFJYVXHL.js → chunk-JLM7BHI7.js} +7 -9
  194. package/dist/cli-bundle/chunks/{chunk-VFJYVXHL.js.map → chunk-JLM7BHI7.js.map} +1 -1
  195. package/dist/cli-bundle/chunks/{chunk-6EL7SW5C.js → chunk-JMP4E6D7.js} +114 -122
  196. package/dist/cli-bundle/chunks/chunk-JMP4E6D7.js.map +7 -0
  197. package/dist/cli-bundle/chunks/{chunk-QOUOMPHO.js → chunk-JPECA746.js} +2 -2
  198. package/dist/cli-bundle/chunks/{chunk-KJZOSF7J.js → chunk-JSU5P7VS.js} +100 -35
  199. package/dist/cli-bundle/chunks/chunk-JSU5P7VS.js.map +1 -0
  200. package/dist/cli-bundle/chunks/{context-55VEOYI3.js → chunk-JWXRETDF.js} +79 -82
  201. package/dist/cli-bundle/chunks/chunk-JWXRETDF.js.map +1 -0
  202. package/dist/cli-bundle/chunks/{chunk-OQ2E64FH.js → chunk-KNPEF7QG.js} +4 -4
  203. package/dist/cli-bundle/chunks/{chunk-3BKH2CL3.js → chunk-L5OEFZQG.js} +3 -3
  204. package/dist/cli-bundle/chunks/{chunk-DTABLLVE.js → chunk-LB6TP6MC.js} +5 -7
  205. package/dist/cli-bundle/chunks/{chunk-DTABLLVE.js.map → chunk-LB6TP6MC.js.map} +2 -2
  206. package/dist/cli-bundle/chunks/{chunk-TSI32UEL.js → chunk-MAUKX7JC.js} +6 -8
  207. package/dist/cli-bundle/chunks/{chunk-TSI32UEL.js.map → chunk-MAUKX7JC.js.map} +1 -1
  208. package/dist/cli-bundle/chunks/{chunk-SMXSDY7J.js → chunk-MDPEOIGN.js} +2221 -2172
  209. package/dist/cli-bundle/chunks/chunk-MDPEOIGN.js.map +7 -0
  210. package/dist/cli-bundle/chunks/{chunk-5S4ZGDB2.js → chunk-N74UMG5H.js} +2 -2
  211. package/dist/cli-bundle/chunks/{chunk-IXAZI443.js → chunk-NFDPYAIP.js} +2 -2
  212. package/dist/cli-bundle/chunks/{chunk-SKC4UTRP.js → chunk-NKZAN7BD.js} +3 -3
  213. package/dist/cli-bundle/chunks/chunk-NOLPZMSV.js +116 -0
  214. package/dist/cli-bundle/chunks/chunk-NOLPZMSV.js.map +1 -0
  215. package/dist/cli-bundle/chunks/{chunk-L7UXKP2I.js → chunk-NU2UEROZ.js} +1257 -1029
  216. package/dist/cli-bundle/chunks/chunk-NU2UEROZ.js.map +1 -0
  217. package/dist/cli-bundle/chunks/{chunk-HBAEFWX3.js → chunk-NUHHPVVS.js} +65 -335
  218. package/dist/cli-bundle/chunks/chunk-NUHHPVVS.js.map +7 -0
  219. package/dist/cli-bundle/chunks/{chunk-JPJDP4VU.js → chunk-NWMZWYYB.js} +2 -2
  220. package/dist/cli-bundle/chunks/{chunk-MWMHZOZZ.js → chunk-OGXLACHC.js} +10 -14
  221. package/dist/cli-bundle/chunks/{chunk-MWMHZOZZ.js.map → chunk-OGXLACHC.js.map} +1 -1
  222. package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js +379 -0
  223. package/dist/cli-bundle/chunks/chunk-OKQ22KTH.js.map +1 -0
  224. package/dist/cli-bundle/chunks/{chunk-KKX4Z2SE.js → chunk-OTUHB4HS.js} +4 -4
  225. package/dist/cli-bundle/chunks/{chunk-ZLWRPBOW.js → chunk-QCWF6IYD.js} +510 -364
  226. package/dist/cli-bundle/chunks/chunk-QCWF6IYD.js.map +1 -0
  227. package/dist/cli-bundle/chunks/{chunk-PRVTGX64.js → chunk-RGEMWD6Q.js} +11 -23
  228. package/dist/cli-bundle/chunks/chunk-RGEMWD6Q.js.map +7 -0
  229. package/dist/cli-bundle/chunks/chunk-RH5ZBYFD.js +809 -0
  230. package/dist/cli-bundle/chunks/chunk-RH5ZBYFD.js.map +7 -0
  231. package/dist/cli-bundle/chunks/{chunk-ALQKV6U7.js → chunk-RLDHZHQS.js} +12 -16
  232. package/dist/cli-bundle/chunks/{chunk-ALQKV6U7.js.map → chunk-RLDHZHQS.js.map} +1 -1
  233. package/dist/cli-bundle/chunks/{schema-C6QA367T.js → chunk-RMMQ74TG.js} +144 -67
  234. package/dist/cli-bundle/chunks/chunk-RMMQ74TG.js.map +7 -0
  235. package/dist/cli-bundle/chunks/{chunk-EYPINTFR.js → chunk-RVUALSJF.js} +1516 -753
  236. package/dist/cli-bundle/chunks/chunk-RVUALSJF.js.map +7 -0
  237. package/dist/cli-bundle/chunks/chunk-SDR5J34Q.js +2468 -0
  238. package/dist/cli-bundle/chunks/chunk-SDR5J34Q.js.map +7 -0
  239. package/dist/cli-bundle/chunks/{chunk-WB5BYQMF.js → chunk-SLMUGTK3.js} +4 -4
  240. package/dist/cli-bundle/chunks/{chunk-SUREE24M.js → chunk-TP5Q5ZD3.js} +12 -24
  241. package/dist/cli-bundle/chunks/chunk-TP5Q5ZD3.js.map +1 -0
  242. package/dist/cli-bundle/chunks/{chunk-UACWNBL2.js → chunk-UYUYDGIB.js} +7 -9
  243. package/dist/cli-bundle/chunks/{chunk-UACWNBL2.js.map → chunk-UYUYDGIB.js.map} +1 -1
  244. package/dist/cli-bundle/chunks/{chunk-V4UYNSEM.js → chunk-UZIWVBE6.js} +6 -8
  245. package/dist/cli-bundle/chunks/{chunk-V4UYNSEM.js.map → chunk-UZIWVBE6.js.map} +1 -1
  246. package/dist/cli-bundle/chunks/{chunk-EWRSXOIZ.js → chunk-V3NOKJF2.js} +11 -13
  247. package/dist/cli-bundle/chunks/{chunk-EWRSXOIZ.js.map → chunk-V3NOKJF2.js.map} +1 -1
  248. package/dist/cli-bundle/chunks/{chunk-XXKV4UWE.js → chunk-VARHOHYV.js} +571 -507
  249. package/dist/cli-bundle/chunks/chunk-VARHOHYV.js.map +7 -0
  250. package/dist/cli-bundle/chunks/{chunk-AEACLRVH.js → chunk-VICZWYGZ.js} +18 -11
  251. package/dist/cli-bundle/chunks/chunk-VICZWYGZ.js.map +7 -0
  252. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js +84 -0
  253. package/dist/cli-bundle/chunks/chunk-VY3VQ22F.js.map +1 -0
  254. package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js +382 -0
  255. package/dist/cli-bundle/chunks/chunk-VZDBVEZR.js.map +7 -0
  256. package/dist/cli-bundle/chunks/{chunk-GDUMGZK3.js → chunk-W4ULYO7Z.js} +11 -13
  257. package/dist/cli-bundle/chunks/{chunk-GDUMGZK3.js.map → chunk-W4ULYO7Z.js.map} +1 -1
  258. package/dist/cli-bundle/chunks/{chunk-I6QMJ2XT.js → chunk-WYDHYJPO.js} +2 -2
  259. package/dist/cli-bundle/chunks/{chunk-ALKFCIIB.js → chunk-YITK2PJ6.js} +9 -11
  260. package/dist/cli-bundle/chunks/{chunk-ALKFCIIB.js.map → chunk-YITK2PJ6.js.map} +1 -1
  261. package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js +84 -0
  262. package/dist/cli-bundle/chunks/chunk-YJIEJRZB.js.map +1 -0
  263. package/dist/cli-bundle/chunks/{chunk-LNEDHJNQ.js → chunk-ZETXE4SE.js} +66 -329
  264. package/dist/cli-bundle/chunks/chunk-ZETXE4SE.js.map +1 -0
  265. package/dist/cli-bundle/chunks/{chunk-KIEAK7YE.js → chunk-ZRP4VG5U.js} +2 -2
  266. package/dist/cli-bundle/chunks/{claim-FZZZCAY6.js → claim-EMQLYPRW.js} +10 -12
  267. package/dist/cli-bundle/chunks/{claim-FZZZCAY6.js.map → claim-EMQLYPRW.js.map} +1 -1
  268. package/dist/cli-bundle/chunks/{claim-XK5QBZE3.js → claim-T3GCKV7C.js} +8 -10
  269. package/dist/cli-bundle/chunks/{claim-XK5QBZE3.js.map → claim-T3GCKV7C.js.map} +1 -1
  270. package/dist/cli-bundle/chunks/close-E6ZZGCJY.js +14 -0
  271. package/dist/cli-bundle/chunks/{close-QHMVWM7M.js → close-TQYAAFJP.js} +7 -8
  272. package/dist/cli-bundle/chunks/{close-many-OIXJE2JZ.js → close-many-BG5QQIDQ.js} +16 -18
  273. package/dist/cli-bundle/chunks/{close-many-OIXJE2JZ.js.map → close-many-BG5QQIDQ.js.map} +1 -1
  274. package/dist/cli-bundle/chunks/{close-many-SUU5BS2C.js → close-many-LDRVEQY2.js} +18 -20
  275. package/dist/cli-bundle/chunks/{close-many-SUU5BS2C.js.map → close-many-LDRVEQY2.js.map} +1 -1
  276. package/dist/cli-bundle/chunks/{comments-5YM62D75.js → comments-QCKR2YY2.js} +11 -13
  277. package/dist/cli-bundle/chunks/{comments-5YM62D75.js.map → comments-QCKR2YY2.js.map} +1 -1
  278. package/dist/cli-bundle/chunks/{comments-RH3IBIRH.js → comments-YUXJRZPQ.js} +9 -11
  279. package/dist/cli-bundle/chunks/{comments-RH3IBIRH.js.map → comments-YUXJRZPQ.js.map} +1 -1
  280. package/dist/cli-bundle/chunks/{config-NCNNWF6R.js → config-DMSU64QO.js} +18 -387
  281. package/dist/cli-bundle/chunks/config-DMSU64QO.js.map +7 -0
  282. package/dist/cli-bundle/chunks/{config-SW3U7XP2.js → config-QH2DICD6.js} +18 -380
  283. package/dist/cli-bundle/chunks/config-QH2DICD6.js.map +1 -0
  284. package/dist/cli-bundle/chunks/context-B6275WPX.js +46 -0
  285. package/dist/cli-bundle/chunks/context-OCZ3FJ4Z.js +42 -0
  286. package/dist/cli-bundle/chunks/{contracts-SY6PDFIK.js → contracts-HN7ABKLP.js} +72 -15
  287. package/dist/cli-bundle/chunks/contracts-HN7ABKLP.js.map +7 -0
  288. package/dist/cli-bundle/chunks/{contracts-JXFGBOYT.js → contracts-W4FZVVD6.js} +72 -15
  289. package/dist/cli-bundle/chunks/contracts-W4FZVVD6.js.map +1 -0
  290. package/dist/cli-bundle/chunks/{copy-N3GE6FYS.js → copy-BTJOSKKT.js} +7 -11
  291. package/dist/cli-bundle/chunks/{copy-N3GE6FYS.js.map → copy-BTJOSKKT.js.map} +1 -1
  292. package/dist/cli-bundle/chunks/{copy-IEDBJOOX.js → copy-DEM4DATS.js} +9 -13
  293. package/dist/cli-bundle/chunks/{copy-IEDBJOOX.js.map → copy-DEM4DATS.js.map} +1 -1
  294. package/dist/cli-bundle/chunks/create-OH3BDGBB.js +28 -0
  295. package/dist/cli-bundle/chunks/{create-O4VONGPG.js → create-RLRJMRTM.js} +12 -14
  296. package/dist/cli-bundle/chunks/{delete-LPEIF7RU.js → delete-BHK7VB2Z.js} +5 -7
  297. package/dist/cli-bundle/chunks/{delete-LPEIF7RU.js.map → delete-BHK7VB2Z.js.map} +1 -1
  298. package/dist/cli-bundle/chunks/{delete-724EQ6OS.js → delete-LSVHAB4Y.js} +7 -9
  299. package/dist/cli-bundle/chunks/{delete-724EQ6OS.js.map → delete-LSVHAB4Y.js.map} +1 -1
  300. package/dist/cli-bundle/chunks/{deps-RSBU4SIU.js → deps-4UDFJRUA.js} +8 -11
  301. package/dist/cli-bundle/chunks/{deps-RSBU4SIU.js.map → deps-4UDFJRUA.js.map} +1 -1
  302. package/dist/cli-bundle/chunks/{deps-T3Y6Y7RT.js → deps-XHYXWEPT.js} +6 -9
  303. package/dist/cli-bundle/chunks/{deps-T3Y6Y7RT.js.map → deps-XHYXWEPT.js.map} +1 -1
  304. package/dist/cli-bundle/chunks/{docs-IFS7HZPP.js → docs-26S44RXU.js} +8 -9
  305. package/dist/cli-bundle/chunks/{docs-IFS7HZPP.js.map → docs-26S44RXU.js.map} +1 -1
  306. package/dist/cli-bundle/chunks/{docs-75ZLCO3G.js → docs-GYZNVS26.js} +10 -11
  307. package/dist/cli-bundle/chunks/{docs-75ZLCO3G.js.map → docs-GYZNVS26.js.map} +1 -1
  308. package/dist/cli-bundle/chunks/{eval-L2KD7W3M.js → eval-PGRVIJQU.js} +12 -14
  309. package/dist/cli-bundle/chunks/{eval-L2KD7W3M.js.map → eval-PGRVIJQU.js.map} +1 -1
  310. package/dist/cli-bundle/chunks/{eval-QGR7JCQO.js → eval-UYF3ZPVO.js} +10 -12
  311. package/dist/cli-bundle/chunks/{eval-QGR7JCQO.js.map → eval-UYF3ZPVO.js.map} +1 -1
  312. package/dist/cli-bundle/chunks/{extension-YQF4CPIR.js → extension-CPSLJQVE.js} +12 -7
  313. package/dist/cli-bundle/chunks/{extension-3JYWJ5K2.js → extension-CXJ6RELI.js} +12 -7
  314. package/dist/cli-bundle/chunks/{files-EPEJMJHQ.js → files-MBNICQFM.js} +9 -11
  315. package/dist/cli-bundle/chunks/{files-EPEJMJHQ.js.map → files-MBNICQFM.js.map} +1 -1
  316. package/dist/cli-bundle/chunks/{files-5BQWDRDT.js → files-NQHEXUZD.js} +11 -13
  317. package/dist/cli-bundle/chunks/{files-5BQWDRDT.js.map → files-NQHEXUZD.js.map} +1 -1
  318. package/dist/cli-bundle/chunks/{focus-RWGKD76E.js → focus-DWYIG7GU.js} +10 -14
  319. package/dist/cli-bundle/chunks/{focus-RWGKD76E.js.map → focus-DWYIG7GU.js.map} +1 -1
  320. package/dist/cli-bundle/chunks/{focus-DQVJAPOE.js → focus-XZW5423D.js} +8 -12
  321. package/dist/cli-bundle/chunks/{focus-DQVJAPOE.js.map → focus-XZW5423D.js.map} +1 -1
  322. package/dist/cli-bundle/chunks/{gc-BEJMQT64.js → gc-7GQYOS2G.js} +3 -3
  323. package/dist/cli-bundle/chunks/{gc-JEFQDJPA.js → gc-LPVMKJQJ.js} +3 -3
  324. package/dist/cli-bundle/chunks/{get-LQG6PEVG.js → get-A7MAOHCU.js} +10 -13
  325. package/dist/cli-bundle/chunks/{get-LQG6PEVG.js.map → get-A7MAOHCU.js.map} +1 -1
  326. package/dist/cli-bundle/chunks/{get-WVN75H42.js → get-DSDEKJ3L.js} +12 -15
  327. package/dist/cli-bundle/chunks/{get-WVN75H42.js.map → get-DSDEKJ3L.js.map} +1 -1
  328. package/dist/cli-bundle/chunks/{health-JJJOY7DJ.js → health-3IPFLKXB.js} +17 -17
  329. package/dist/cli-bundle/chunks/{health-P67NZ6TT.js → health-GZXGBZ36.js} +17 -17
  330. package/dist/cli-bundle/chunks/{history-RUKPKNY7.js → history-NERDJNUB.js} +8 -10
  331. package/dist/cli-bundle/chunks/history-WSZHY3PN.js +18 -0
  332. package/dist/cli-bundle/chunks/{history-compact-NQ7VPRVT.js → history-compact-2WRZ2WK4.js} +11 -14
  333. package/dist/cli-bundle/chunks/{history-compact-NQ7VPRVT.js.map → history-compact-2WRZ2WK4.js.map} +1 -1
  334. package/dist/cli-bundle/chunks/{history-compact-ZAOWR7GD.js → history-compact-HR7BB4LR.js} +13 -16
  335. package/dist/cli-bundle/chunks/{history-compact-ZAOWR7GD.js.map → history-compact-HR7BB4LR.js.map} +1 -1
  336. package/dist/cli-bundle/chunks/history-redact-MP6CH7U5.js +19 -0
  337. package/dist/cli-bundle/chunks/{history-redact-YY4XYVEP.js → history-redact-O3NBCNWC.js} +9 -11
  338. package/dist/cli-bundle/chunks/{history-repair-EHL4ODQY.js → history-repair-LCMOS45X.js} +11 -14
  339. package/dist/cli-bundle/chunks/{history-repair-EHL4ODQY.js.map → history-repair-LCMOS45X.js.map} +1 -1
  340. package/dist/cli-bundle/chunks/{history-repair-YSQH6SY6.js → history-repair-XA3LC4GA.js} +13 -16
  341. package/dist/cli-bundle/chunks/{history-repair-YSQH6SY6.js.map → history-repair-XA3LC4GA.js.map} +1 -1
  342. package/dist/cli-bundle/chunks/{init-HBFGYS66.js → init-64XDLQJB.js} +12 -11
  343. package/dist/cli-bundle/chunks/init-PAX32BJA.js +22 -0
  344. package/dist/cli-bundle/chunks/{learnings-KFQO7GEZ.js → learnings-JR6MA5TI.js} +9 -11
  345. package/dist/cli-bundle/chunks/{learnings-KFQO7GEZ.js.map → learnings-JR6MA5TI.js.map} +1 -1
  346. package/dist/cli-bundle/chunks/{learnings-J555ZFPD.js → learnings-LPKCSJX7.js} +11 -13
  347. package/dist/cli-bundle/chunks/{learnings-J555ZFPD.js.map → learnings-LPKCSJX7.js.map} +1 -1
  348. package/dist/cli-bundle/chunks/{list-C7R33MD5.js → list-DNBJVO3E.js} +10 -10
  349. package/dist/cli-bundle/chunks/{list-DSN6UNFB.js → list-G5Y65VF6.js} +10 -10
  350. package/dist/cli-bundle/chunks/next-BCERKDUR.js +277 -0
  351. package/dist/cli-bundle/chunks/next-BCERKDUR.js.map +7 -0
  352. package/dist/cli-bundle/chunks/next-FYTQF6HG.js +274 -0
  353. package/dist/cli-bundle/chunks/next-FYTQF6HG.js.map +1 -0
  354. package/dist/cli-bundle/chunks/{notes-V4VNIQL4.js → notes-2BMU3VVQ.js} +9 -11
  355. package/dist/cli-bundle/chunks/{notes-V4VNIQL4.js.map → notes-2BMU3VVQ.js.map} +1 -1
  356. package/dist/cli-bundle/chunks/{notes-VYJFN2A3.js → notes-6KTGO2OJ.js} +11 -13
  357. package/dist/cli-bundle/chunks/{notes-VYJFN2A3.js.map → notes-6KTGO2OJ.js.map} +1 -1
  358. package/dist/cli-bundle/chunks/{plan-RBHQ5PO7.js → plan-4WXEQCTN.js} +15 -18
  359. package/dist/cli-bundle/chunks/{plan-RBHQ5PO7.js.map → plan-4WXEQCTN.js.map} +1 -1
  360. package/dist/cli-bundle/chunks/{plan-DHRSVSHR.js → plan-RKZHQVXR.js} +17 -20
  361. package/dist/cli-bundle/chunks/{plan-DHRSVSHR.js.map → plan-RKZHQVXR.js.map} +1 -1
  362. package/dist/cli-bundle/chunks/profile-4OMM32CD.js +1235 -0
  363. package/dist/cli-bundle/chunks/profile-4OMM32CD.js.map +7 -0
  364. package/dist/cli-bundle/chunks/profile-QLER5ENE.js +1197 -0
  365. package/dist/cli-bundle/chunks/profile-QLER5ENE.js.map +1 -0
  366. package/dist/cli-bundle/chunks/{register-list-query-OM3E2KMY.js → register-list-query-7LV46VAU.js} +45 -21
  367. package/dist/cli-bundle/chunks/register-list-query-7LV46VAU.js.map +1 -0
  368. package/dist/cli-bundle/chunks/{register-list-query-CCMHGZTF.js → register-list-query-SNG5PGA4.js} +44 -20
  369. package/dist/cli-bundle/chunks/register-list-query-SNG5PGA4.js.map +7 -0
  370. package/dist/cli-bundle/chunks/{register-mutation-N3CDEGZU.js → register-mutation-ENNDUAZG.js} +106 -40
  371. package/dist/cli-bundle/chunks/register-mutation-ENNDUAZG.js.map +1 -0
  372. package/dist/cli-bundle/chunks/{register-mutation-UXTTWL6N.js → register-mutation-KK7PHYYU.js} +105 -39
  373. package/dist/cli-bundle/chunks/register-mutation-KK7PHYYU.js.map +7 -0
  374. package/dist/cli-bundle/chunks/{register-operations-UDIFMQKD.js → register-operations-C6OWLDSH.js} +32 -34
  375. package/dist/cli-bundle/chunks/{register-operations-UDIFMQKD.js.map → register-operations-C6OWLDSH.js.map} +1 -1
  376. package/dist/cli-bundle/chunks/{register-operations-R2FLOCRI.js → register-operations-HZ6XERQG.js} +30 -32
  377. package/dist/cli-bundle/chunks/{register-operations-R2FLOCRI.js.map → register-operations-HZ6XERQG.js.map} +1 -1
  378. package/dist/cli-bundle/chunks/{register-setup-G5LTSFYK.js → register-setup-P67EMBDJ.js} +68 -25
  379. package/dist/cli-bundle/chunks/register-setup-P67EMBDJ.js.map +1 -0
  380. package/dist/cli-bundle/chunks/{register-setup-TWHKICM2.js → register-setup-ZKJ53RS7.js} +67 -24
  381. package/dist/cli-bundle/chunks/register-setup-ZKJ53RS7.js.map +7 -0
  382. package/dist/cli-bundle/chunks/{restore-LL2WLEDG.js → restore-4MHZFJ2E.js} +9 -11
  383. package/dist/cli-bundle/chunks/restore-YALDGTQR.js +17 -0
  384. package/dist/cli-bundle/chunks/{scheduling-shortcuts-M4H2ZI64.js → scheduling-shortcuts-LB6DOLRL.js} +14 -16
  385. package/dist/cli-bundle/chunks/{scheduling-shortcuts-M4H2ZI64.js.map → scheduling-shortcuts-LB6DOLRL.js.map} +1 -1
  386. package/dist/cli-bundle/chunks/{scheduling-shortcuts-255GI3BU.js → scheduling-shortcuts-UTOYKLXQ.js} +12 -14
  387. package/dist/cli-bundle/chunks/{scheduling-shortcuts-255GI3BU.js.map → scheduling-shortcuts-UTOYKLXQ.js.map} +1 -1
  388. package/dist/cli-bundle/chunks/schema-73HR2OJW.js +75 -0
  389. package/dist/cli-bundle/chunks/schema-U6LJKSIR.js +71 -0
  390. package/dist/cli-bundle/chunks/{search-2EI6EAXH.js → search-AXPXKZER.js} +10 -12
  391. package/dist/cli-bundle/chunks/{search-QBFBLQRO.js → search-KILGT37L.js} +10 -12
  392. package/dist/cli-bundle/chunks/{stats-TKC6CAKB.js → stats-PSYVVTNZ.js} +21 -13
  393. package/dist/cli-bundle/chunks/stats-PSYVVTNZ.js.map +1 -0
  394. package/dist/cli-bundle/chunks/{stats-TCW2SZQG.js → stats-W5KNVJWQ.js} +20 -12
  395. package/dist/cli-bundle/chunks/stats-W5KNVJWQ.js.map +7 -0
  396. package/dist/cli-bundle/chunks/{telemetry-BT2VSWU2.js → telemetry-BZUF6H7G.js} +4 -4
  397. package/dist/cli-bundle/chunks/{telemetry-LQ6FRTUT.js → telemetry-GAHHQTOS.js} +4 -4
  398. package/dist/cli-bundle/chunks/test-ACD52Z3S.js +35 -0
  399. package/dist/cli-bundle/chunks/test-ACD52Z3S.js.map +7 -0
  400. package/dist/cli-bundle/chunks/{test-NV2DRPUS.js → test-PWDIZ255.js} +15 -16
  401. package/dist/cli-bundle/chunks/test-PWDIZ255.js.map +1 -0
  402. package/dist/cli-bundle/chunks/{test-all-DZ76VTPQ.js → test-all-L2MDDUCA.js} +20 -22
  403. package/dist/cli-bundle/chunks/{test-all-DZ76VTPQ.js.map → test-all-L2MDDUCA.js.map} +1 -1
  404. package/dist/cli-bundle/chunks/{test-all-REW67LXT.js → test-all-RBZ6DLU2.js} +18 -20
  405. package/dist/cli-bundle/chunks/{test-all-REW67LXT.js.map → test-all-RBZ6DLU2.js.map} +1 -1
  406. package/dist/cli-bundle/chunks/{test-runs-PX73DMMI.js → test-runs-PLRAZEFW.js} +5 -6
  407. package/dist/cli-bundle/chunks/test-runs-PLRAZEFW.js.map +7 -0
  408. package/dist/cli-bundle/chunks/{test-runs-FQ5WNQLP.js → test-runs-UXIXPDKU.js} +6 -7
  409. package/dist/cli-bundle/chunks/test-runs-UXIXPDKU.js.map +1 -0
  410. package/dist/cli-bundle/chunks/update-AMRSOIWP.js +24 -0
  411. package/dist/cli-bundle/chunks/update-AMRSOIWP.js.map +7 -0
  412. package/dist/cli-bundle/chunks/update-KFX2SIAC.js +28 -0
  413. package/dist/cli-bundle/chunks/update-KFX2SIAC.js.map +1 -0
  414. package/dist/cli-bundle/chunks/{update-many-Q5ZEI64S.js → update-many-RNSBX2TA.js} +35 -36
  415. package/dist/cli-bundle/chunks/{update-many-Q5ZEI64S.js.map → update-many-RNSBX2TA.js.map} +1 -1
  416. package/dist/cli-bundle/chunks/{update-many-2ILP6E4Y.js → update-many-Z5GJS5LC.js} +33 -34
  417. package/dist/cli-bundle/chunks/{update-many-2ILP6E4Y.js.map → update-many-Z5GJS5LC.js.map} +1 -1
  418. package/dist/cli-bundle/chunks/{upgrade-FOZKQTQF.js → upgrade-BRL6KCOJ.js} +13 -8
  419. package/dist/cli-bundle/chunks/{upgrade-FOZKQTQF.js.map → upgrade-BRL6KCOJ.js.map} +1 -1
  420. package/dist/cli-bundle/chunks/{upgrade-DHL74PQH.js → upgrade-HAK6JG2O.js} +11 -6
  421. package/dist/cli-bundle/chunks/{upgrade-DHL74PQH.js.map → upgrade-HAK6JG2O.js.map} +1 -1
  422. package/dist/cli-bundle/chunks/{validate-HYZNIB6W.js → validate-MTUVL5VC.js} +38 -28
  423. package/dist/cli-bundle/chunks/validate-MTUVL5VC.js.map +7 -0
  424. package/dist/cli-bundle/chunks/{validate-54SYJ7QW.js → validate-X5W76YJL.js} +39 -29
  425. package/dist/cli-bundle/chunks/validate-X5W76YJL.js.map +1 -0
  426. package/dist/cli-bundle/main.js +95 -724
  427. package/dist/cli-bundle/main.js.map +4 -4
  428. package/dist/core/config/positional-value.d.ts +2 -0
  429. package/dist/core/config/positional-value.js +2 -2
  430. package/dist/core/config/positional-value.js.map +1 -1
  431. package/dist/core/extensions/activation-summary-markdown.d.ts +71 -0
  432. package/dist/core/extensions/activation-summary-markdown.js +151 -0
  433. package/dist/core/extensions/activation-summary-markdown.js.map +1 -0
  434. package/dist/core/extensions/activation-summary.d.ts +2 -0
  435. package/dist/core/extensions/activation-summary.js +3 -2
  436. package/dist/core/extensions/activation-summary.js.map +1 -1
  437. package/dist/core/extensions/capability-usage.d.ts +1 -1
  438. package/dist/core/extensions/capability-usage.js +4 -3
  439. package/dist/core/extensions/capability-usage.js.map +1 -1
  440. package/dist/core/extensions/extension-policy.d.ts +18 -3
  441. package/dist/core/extensions/extension-policy.js +116 -106
  442. package/dist/core/extensions/extension-policy.js.map +1 -1
  443. package/dist/core/extensions/extension-registries.js +3 -2
  444. package/dist/core/extensions/extension-registries.js.map +1 -1
  445. package/dist/core/extensions/extension-types.d.ts +21 -1
  446. package/dist/core/extensions/extension-types.js +3 -2
  447. package/dist/core/extensions/extension-types.js.map +1 -1
  448. package/dist/core/extensions/loader.js +439 -232
  449. package/dist/core/extensions/loader.js.map +1 -1
  450. package/dist/core/fs/fs-utils.js +27 -2
  451. package/dist/core/fs/fs-utils.js.map +1 -1
  452. package/dist/core/item/actionability.d.ts +57 -0
  453. package/dist/core/item/actionability.js +178 -0
  454. package/dist/core/item/actionability.js.map +1 -0
  455. package/dist/core/item/item-format.js +523 -410
  456. package/dist/core/item/item-format.js.map +1 -1
  457. package/dist/core/item/type-registry.js +18 -45
  458. package/dist/core/item/type-registry.js.map +1 -1
  459. package/dist/core/profile/profile-describe.d.ts +64 -0
  460. package/dist/core/profile/profile-describe.js +83 -0
  461. package/dist/core/profile/profile-describe.js.map +1 -0
  462. package/dist/core/profile/profile-lint.d.ts +53 -0
  463. package/dist/core/profile/profile-lint.js +422 -0
  464. package/dist/core/profile/profile-lint.js.map +1 -0
  465. package/dist/core/profile/profile-plan.d.ts +145 -0
  466. package/dist/core/profile/profile-plan.js +0 -0
  467. package/dist/core/profile/profile-plan.js.map +1 -0
  468. package/dist/core/profile/profile-presets.d.ts +218 -0
  469. package/dist/core/profile/profile-presets.js +325 -0
  470. package/dist/core/profile/profile-presets.js.map +1 -0
  471. package/dist/core/schema/fields-file.js +25 -25
  472. package/dist/core/schema/fields-file.js.map +1 -1
  473. package/dist/core/schema/item-types-file.js +3 -3
  474. package/dist/core/schema/item-types-file.js.map +1 -1
  475. package/dist/core/schema/runtime-schema.js +4 -4
  476. package/dist/core/schema/runtime-schema.js.map +1 -1
  477. package/dist/core/schema/status-defs-file.js +3 -3
  478. package/dist/core/schema/status-defs-file.js.map +1 -1
  479. package/dist/core/shared/serialization.js +83 -62
  480. package/dist/core/shared/serialization.js.map +1 -1
  481. package/dist/core/store/item-store.d.ts +1 -0
  482. package/dist/core/store/item-store.js +16 -8
  483. package/dist/core/store/item-store.js.map +1 -1
  484. package/dist/core/store/paths.js +4 -32
  485. package/dist/core/store/paths.js.map +1 -1
  486. package/dist/core/store/settings.js +14 -14
  487. package/dist/core/store/settings.js.map +1 -1
  488. package/dist/core/telemetry/observability.js +50 -54
  489. package/dist/core/telemetry/observability.js.map +1 -1
  490. package/dist/core/telemetry/runtime.js +11 -2
  491. package/dist/core/telemetry/runtime.js.map +1 -1
  492. package/dist/core/test/background-runs.js +3 -2
  493. package/dist/core/test/background-runs.js.map +1 -1
  494. package/dist/core/validate/linked-artifact-reference.d.ts +24 -0
  495. package/dist/core/validate/linked-artifact-reference.js +41 -0
  496. package/dist/core/validate/linked-artifact-reference.js.map +1 -0
  497. package/dist/mcp/server.js +540 -420
  498. package/dist/mcp/server.js.map +1 -1
  499. package/dist/mcp/tool-definitions.js +33 -2
  500. package/dist/mcp/tool-definitions.js.map +1 -1
  501. package/dist/sdk/cli-contracts/commander-types.d.ts +1 -0
  502. package/dist/sdk/cli-contracts/commander-types.js +15 -2
  503. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  504. package/dist/sdk/cli-contracts/enum-contracts.d.ts +3 -3
  505. package/dist/sdk/cli-contracts/enum-contracts.js +6 -2
  506. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  507. package/dist/sdk/cli-contracts/flag-contracts.d.ts +149 -0
  508. package/dist/sdk/cli-contracts/flag-contracts.js +1514 -0
  509. package/dist/sdk/cli-contracts/flag-contracts.js.map +1 -0
  510. package/dist/sdk/cli-contracts/string-lists.d.ts +14 -0
  511. package/dist/sdk/cli-contracts/string-lists.js +20 -0
  512. package/dist/sdk/cli-contracts/string-lists.js.map +1 -0
  513. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -1
  514. package/dist/sdk/cli-contracts/tool-option-contracts.js +51 -109
  515. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  516. package/dist/sdk/cli-contracts/tool-parameter-tables.d.ts +17 -0
  517. package/dist/sdk/cli-contracts/tool-parameter-tables.js +54 -5
  518. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  519. package/dist/sdk/cli-contracts/tool-schema.d.ts +74 -0
  520. package/dist/sdk/cli-contracts/tool-schema.js +871 -0
  521. package/dist/sdk/cli-contracts/tool-schema.js.map +1 -0
  522. package/dist/sdk/cli-contracts.d.ts +13 -193
  523. package/dist/sdk/cli-contracts.js +5 -2277
  524. package/dist/sdk/cli-contracts.js.map +1 -1
  525. package/dist/sdk/compose.d.ts +11 -5
  526. package/dist/sdk/compose.js +240 -124
  527. package/dist/sdk/compose.js.map +1 -1
  528. package/dist/sdk/define.d.ts +14 -0
  529. package/dist/sdk/define.js +17 -2
  530. package/dist/sdk/define.js.map +1 -1
  531. package/dist/sdk/index.d.ts +14 -3
  532. package/dist/sdk/index.js +14 -3
  533. package/dist/sdk/index.js.map +1 -1
  534. package/dist/sdk/testing.d.ts +82 -2
  535. package/dist/sdk/testing.js +74 -3
  536. package/dist/sdk/testing.js.map +1 -1
  537. package/docs/AGENT_GUIDE.md +2 -0
  538. package/docs/CLAUDE_CODE_PLUGIN.md +2 -2
  539. package/docs/COMMANDS.md +37 -0
  540. package/docs/EXTENSIONS.md +12 -13
  541. package/docs/RELEASING.md +8 -4
  542. package/docs/SDK.md +184 -17
  543. package/docs/TESTING.md +12 -0
  544. package/docs/examples/policy-restricted-extension/README.md +6 -0
  545. package/docs/examples/policy-restricted-extension/index.ts +40 -0
  546. package/docs/examples/policy-restricted-extension/manifest.json +2 -2
  547. package/docs/examples/starter-extension/README.md +14 -2
  548. package/docs/examples/starter-extension/{index.js → index.ts} +51 -6
  549. package/docs/examples/starter-extension/manifest.json +2 -2
  550. package/package.json +20 -7
  551. package/packages/pm-beads/extensions/beads/index.ts +3 -3
  552. package/packages/pm-beads/extensions/beads/manifest.json +2 -2
  553. package/packages/pm-beads/extensions/beads/runtime-loader.ts +19 -7
  554. package/packages/pm-beads/extensions/beads/runtime.ts +155 -37
  555. package/packages/pm-calendar/extensions/calendar/index.ts +3 -3
  556. package/packages/pm-calendar/extensions/calendar/manifest.json +2 -2
  557. package/packages/pm-calendar/extensions/calendar/runtime.ts +2 -2
  558. package/packages/pm-command-kit/extensions/command-kit/index.ts +1 -1
  559. package/packages/pm-command-kit/extensions/command-kit/manifest.json +2 -2
  560. package/packages/pm-governance-audit/extensions/governance-audit/index.ts +2 -2
  561. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +2 -2
  562. package/packages/pm-governance-audit/extensions/governance-audit/runtime.ts +1 -1
  563. package/packages/pm-guide-shell/extensions/guide-shell/index.ts +2 -2
  564. package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +2 -2
  565. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +1 -1
  566. package/packages/pm-kanban/README.md +97 -0
  567. package/packages/pm-kanban/extensions/kanban/index.ts +191 -0
  568. package/packages/pm-kanban/extensions/kanban/manifest.json +19 -0
  569. package/packages/pm-kanban/package.json +57 -0
  570. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +1 -1
  571. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +2 -2
  572. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.ts +2 -2
  573. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +2 -2
  574. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.ts +1 -1
  575. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +2 -2
  576. package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +2 -2
  577. package/packages/pm-search-advanced/extensions/search-advanced/runtime.ts +1 -1
  578. package/packages/pm-templates/extensions/templates/index.ts +2 -2
  579. package/packages/pm-templates/extensions/templates/manifest.json +2 -2
  580. package/packages/pm-templates/extensions/templates/runtime.ts +1 -1
  581. package/packages/pm-todos/extensions/todos/index.ts +3 -3
  582. package/packages/pm-todos/extensions/todos/manifest.json +2 -2
  583. package/packages/pm-todos/extensions/todos/runtime-loader.ts +19 -7
  584. package/packages/pm-todos/extensions/todos/runtime.ts +177 -43
  585. package/plugins/pm-claude/scripts/pm-mcp-server.mjs +2 -2
  586. package/plugins/pm-codex/scripts/pm-mcp-server.mjs +2 -2
  587. package/scripts/bundle-cli.mjs +1 -1
  588. package/dist/cli-bundle/chunks/activity-54TXGJ2T.js +0 -18
  589. package/dist/cli-bundle/chunks/aggregate-63NWNIBR.js.map +0 -1
  590. package/dist/cli-bundle/chunks/aggregate-YHCYX2EV.js.map +0 -7
  591. package/dist/cli-bundle/chunks/chunk-6EL7SW5C.js.map +0 -7
  592. package/dist/cli-bundle/chunks/chunk-6W3Y65PL.js.map +0 -7
  593. package/dist/cli-bundle/chunks/chunk-AEACLRVH.js.map +0 -7
  594. package/dist/cli-bundle/chunks/chunk-B74BP6IS.js +0 -78
  595. package/dist/cli-bundle/chunks/chunk-B74BP6IS.js.map +0 -7
  596. package/dist/cli-bundle/chunks/chunk-BFFO3AIB.js.map +0 -1
  597. package/dist/cli-bundle/chunks/chunk-C4C3EJCJ.js.map +0 -7
  598. package/dist/cli-bundle/chunks/chunk-EYPINTFR.js.map +0 -7
  599. package/dist/cli-bundle/chunks/chunk-FBLT6WGK.js +0 -75
  600. package/dist/cli-bundle/chunks/chunk-FBLT6WGK.js.map +0 -1
  601. package/dist/cli-bundle/chunks/chunk-GQYJEEFX.js.map +0 -1
  602. package/dist/cli-bundle/chunks/chunk-HBAEFWX3.js.map +0 -7
  603. package/dist/cli-bundle/chunks/chunk-HC2S36NB.js.map +0 -1
  604. package/dist/cli-bundle/chunks/chunk-IAP5KYBQ.js.map +0 -1
  605. package/dist/cli-bundle/chunks/chunk-INPHFO33.js +0 -764
  606. package/dist/cli-bundle/chunks/chunk-INPHFO33.js.map +0 -7
  607. package/dist/cli-bundle/chunks/chunk-IOT6WRL5.js +0 -86
  608. package/dist/cli-bundle/chunks/chunk-IOT6WRL5.js.map +0 -7
  609. package/dist/cli-bundle/chunks/chunk-ISEKN64V.js +0 -35
  610. package/dist/cli-bundle/chunks/chunk-ISEKN64V.js.map +0 -7
  611. package/dist/cli-bundle/chunks/chunk-J3NMWFIN.js +0 -115
  612. package/dist/cli-bundle/chunks/chunk-J3NMWFIN.js.map +0 -1
  613. package/dist/cli-bundle/chunks/chunk-J7I4C5ZB.js.map +0 -7
  614. package/dist/cli-bundle/chunks/chunk-JKL6HRMV.js.map +0 -7
  615. package/dist/cli-bundle/chunks/chunk-KJZOSF7J.js.map +0 -1
  616. package/dist/cli-bundle/chunks/chunk-L7UXKP2I.js.map +0 -1
  617. package/dist/cli-bundle/chunks/chunk-LNEDHJNQ.js.map +0 -1
  618. package/dist/cli-bundle/chunks/chunk-M6TUBOGW.js.map +0 -1
  619. package/dist/cli-bundle/chunks/chunk-MEXZ5XUM.js.map +0 -7
  620. package/dist/cli-bundle/chunks/chunk-N5B6WZC5.js.map +0 -1
  621. package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js +0 -761
  622. package/dist/cli-bundle/chunks/chunk-NJ73ALW2.js.map +0 -1
  623. package/dist/cli-bundle/chunks/chunk-NVXGVEFD.js +0 -83
  624. package/dist/cli-bundle/chunks/chunk-NVXGVEFD.js.map +0 -1
  625. package/dist/cli-bundle/chunks/chunk-OF7V47P3.js.map +0 -1
  626. package/dist/cli-bundle/chunks/chunk-OHDQNKJB.js.map +0 -7
  627. package/dist/cli-bundle/chunks/chunk-PEL2NLQE.js +0 -118
  628. package/dist/cli-bundle/chunks/chunk-PEL2NLQE.js.map +0 -7
  629. package/dist/cli-bundle/chunks/chunk-PRVTGX64.js.map +0 -7
  630. package/dist/cli-bundle/chunks/chunk-RAWA3Y7O.js.map +0 -1
  631. package/dist/cli-bundle/chunks/chunk-SMXSDY7J.js.map +0 -7
  632. package/dist/cli-bundle/chunks/chunk-SUREE24M.js.map +0 -1
  633. package/dist/cli-bundle/chunks/chunk-TKPP4GOO.js +0 -654
  634. package/dist/cli-bundle/chunks/chunk-TKPP4GOO.js.map +0 -1
  635. package/dist/cli-bundle/chunks/chunk-VSAABFGQ.js.map +0 -1
  636. package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js +0 -32
  637. package/dist/cli-bundle/chunks/chunk-W2VMLL5S.js.map +0 -1
  638. package/dist/cli-bundle/chunks/chunk-XVYKWZNL.js.map +0 -7
  639. package/dist/cli-bundle/chunks/chunk-XXKV4UWE.js.map +0 -7
  640. package/dist/cli-bundle/chunks/chunk-ZLWRPBOW.js.map +0 -1
  641. package/dist/cli-bundle/chunks/chunk-ZV7IQ23N.js +0 -657
  642. package/dist/cli-bundle/chunks/chunk-ZV7IQ23N.js.map +0 -7
  643. package/dist/cli-bundle/chunks/close-JEBZXONN.js +0 -15
  644. package/dist/cli-bundle/chunks/config-NCNNWF6R.js.map +0 -7
  645. package/dist/cli-bundle/chunks/config-SW3U7XP2.js.map +0 -1
  646. package/dist/cli-bundle/chunks/context-55VEOYI3.js.map +0 -1
  647. package/dist/cli-bundle/chunks/context-5LB7UGKE.js.map +0 -7
  648. package/dist/cli-bundle/chunks/contracts-JXFGBOYT.js.map +0 -1
  649. package/dist/cli-bundle/chunks/contracts-SY6PDFIK.js.map +0 -7
  650. package/dist/cli-bundle/chunks/create-CLSCHGJJ.js +0 -30
  651. package/dist/cli-bundle/chunks/history-ALTM2RRP.js +0 -20
  652. package/dist/cli-bundle/chunks/history-redact-5YGLWUDH.js +0 -21
  653. package/dist/cli-bundle/chunks/init-C4CRHW22.js +0 -21
  654. package/dist/cli-bundle/chunks/register-list-query-CCMHGZTF.js.map +0 -7
  655. package/dist/cli-bundle/chunks/register-list-query-OM3E2KMY.js.map +0 -1
  656. package/dist/cli-bundle/chunks/register-mutation-N3CDEGZU.js.map +0 -1
  657. package/dist/cli-bundle/chunks/register-mutation-UXTTWL6N.js.map +0 -7
  658. package/dist/cli-bundle/chunks/register-setup-G5LTSFYK.js.map +0 -1
  659. package/dist/cli-bundle/chunks/register-setup-TWHKICM2.js.map +0 -7
  660. package/dist/cli-bundle/chunks/restore-LQHXBAY5.js +0 -19
  661. package/dist/cli-bundle/chunks/schema-C6QA367T.js.map +0 -7
  662. package/dist/cli-bundle/chunks/schema-QO5I4FBL.js.map +0 -1
  663. package/dist/cli-bundle/chunks/stats-TCW2SZQG.js.map +0 -7
  664. package/dist/cli-bundle/chunks/stats-TKC6CAKB.js.map +0 -1
  665. package/dist/cli-bundle/chunks/test-WA6RZGM2.js +0 -36
  666. package/dist/cli-bundle/chunks/test-runs-FQ5WNQLP.js.map +0 -1
  667. package/dist/cli-bundle/chunks/test-runs-PX73DMMI.js.map +0 -7
  668. package/dist/cli-bundle/chunks/update-BSKMQOYH.js +0 -28
  669. package/dist/cli-bundle/chunks/update-FIGYNQ2I.js +0 -24
  670. package/dist/cli-bundle/chunks/validate-54SYJ7QW.js.map +0 -1
  671. package/dist/cli-bundle/chunks/validate-HYZNIB6W.js.map +0 -7
  672. package/docs/examples/policy-restricted-extension/index.js +0 -21
  673. package/packages/pm-beads/extensions/beads/index.js +0 -64
  674. package/packages/pm-beads/extensions/beads/runtime-loader.js +0 -86
  675. package/packages/pm-beads/extensions/beads/runtime.js +0 -482
  676. package/packages/pm-calendar/extensions/calendar/index.js +0 -150
  677. package/packages/pm-calendar/extensions/calendar/runtime.js +0 -126
  678. package/packages/pm-command-kit/extensions/command-kit/index.js +0 -181
  679. package/packages/pm-governance-audit/extensions/governance-audit/index.js +0 -177
  680. package/packages/pm-governance-audit/extensions/governance-audit/runtime.js +0 -153
  681. package/packages/pm-guide-shell/extensions/guide-shell/index.js +0 -98
  682. package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +0 -294
  683. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +0 -18
  684. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/index.js +0 -124
  685. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/runtime.js +0 -110
  686. package/packages/pm-search-advanced/extensions/search-advanced/index.js +0 -258
  687. package/packages/pm-search-advanced/extensions/search-advanced/runtime.js +0 -361
  688. package/packages/pm-templates/extensions/templates/index.js +0 -132
  689. package/packages/pm-templates/extensions/templates/runtime.js +0 -35
  690. package/packages/pm-todos/extensions/todos/index.js +0 -81
  691. package/packages/pm-todos/extensions/todos/runtime-loader.js +0 -86
  692. package/packages/pm-todos/extensions/todos/runtime.js +0 -545
  693. /package/dist/cli-bundle/chunks/{activity-54TXGJ2T.js.map → activity-AW6XVFH6.js.map} +0 -0
  694. /package/dist/cli-bundle/chunks/{activity-N7RVTLBQ.js.map → activity-DBLQVIP6.js.map} +0 -0
  695. /package/dist/cli-bundle/chunks/{chunk-F32L4HR6.js.map → chunk-27BXPBAY.js.map} +0 -0
  696. /package/dist/cli-bundle/chunks/{chunk-5BBEWX6C.js.map → chunk-3VGN2UWE.js.map} +0 -0
  697. /package/dist/cli-bundle/chunks/{chunk-FMWW2JDU.js.map → chunk-AXIDKKAT.js.map} +0 -0
  698. /package/dist/cli-bundle/chunks/{chunk-TIM4OD74.js.map → chunk-BDTISOSD.js.map} +0 -0
  699. /package/dist/cli-bundle/chunks/{chunk-CZIFFMZI.js.map → chunk-DDPTYJIM.js.map} +0 -0
  700. /package/dist/cli-bundle/chunks/{chunk-AYPQUFCX.js.map → chunk-EJUDVUYZ.js.map} +0 -0
  701. /package/dist/cli-bundle/chunks/{chunk-EOGBMLCE.js.map → chunk-EVMTBV6V.js.map} +0 -0
  702. /package/dist/cli-bundle/chunks/{chunk-CG3KP6I5.js.map → chunk-G7I7DEZA.js.map} +0 -0
  703. /package/dist/cli-bundle/chunks/{chunk-F4BNR2IN.js.map → chunk-HYTGA6GI.js.map} +0 -0
  704. /package/dist/cli-bundle/chunks/{chunk-2WCYE3IF.js.map → chunk-HZZEHPRG.js.map} +0 -0
  705. /package/dist/cli-bundle/chunks/{chunk-YV2OSAMS.js.map → chunk-IJYK2T43.js.map} +0 -0
  706. /package/dist/cli-bundle/chunks/{chunk-QOUOMPHO.js.map → chunk-JPECA746.js.map} +0 -0
  707. /package/dist/cli-bundle/chunks/{chunk-OQ2E64FH.js.map → chunk-KNPEF7QG.js.map} +0 -0
  708. /package/dist/cli-bundle/chunks/{chunk-3BKH2CL3.js.map → chunk-L5OEFZQG.js.map} +0 -0
  709. /package/dist/cli-bundle/chunks/{chunk-5S4ZGDB2.js.map → chunk-N74UMG5H.js.map} +0 -0
  710. /package/dist/cli-bundle/chunks/{chunk-IXAZI443.js.map → chunk-NFDPYAIP.js.map} +0 -0
  711. /package/dist/cli-bundle/chunks/{chunk-SKC4UTRP.js.map → chunk-NKZAN7BD.js.map} +0 -0
  712. /package/dist/cli-bundle/chunks/{chunk-JPJDP4VU.js.map → chunk-NWMZWYYB.js.map} +0 -0
  713. /package/dist/cli-bundle/chunks/{chunk-KKX4Z2SE.js.map → chunk-OTUHB4HS.js.map} +0 -0
  714. /package/dist/cli-bundle/chunks/{chunk-WB5BYQMF.js.map → chunk-SLMUGTK3.js.map} +0 -0
  715. /package/dist/cli-bundle/chunks/{chunk-I6QMJ2XT.js.map → chunk-WYDHYJPO.js.map} +0 -0
  716. /package/dist/cli-bundle/chunks/{chunk-KIEAK7YE.js.map → chunk-ZRP4VG5U.js.map} +0 -0
  717. /package/dist/cli-bundle/chunks/{close-JEBZXONN.js.map → close-E6ZZGCJY.js.map} +0 -0
  718. /package/dist/cli-bundle/chunks/{close-QHMVWM7M.js.map → close-TQYAAFJP.js.map} +0 -0
  719. /package/dist/cli-bundle/chunks/{create-O4VONGPG.js.map → context-B6275WPX.js.map} +0 -0
  720. /package/dist/cli-bundle/chunks/{create-CLSCHGJJ.js.map → context-OCZ3FJ4Z.js.map} +0 -0
  721. /package/dist/cli-bundle/chunks/{extension-YQF4CPIR.js.map → create-OH3BDGBB.js.map} +0 -0
  722. /package/dist/cli-bundle/chunks/{extension-3JYWJ5K2.js.map → create-RLRJMRTM.js.map} +0 -0
  723. /package/dist/cli-bundle/chunks/{history-ALTM2RRP.js.map → extension-CPSLJQVE.js.map} +0 -0
  724. /package/dist/cli-bundle/chunks/{history-RUKPKNY7.js.map → extension-CXJ6RELI.js.map} +0 -0
  725. /package/dist/cli-bundle/chunks/{gc-BEJMQT64.js.map → gc-7GQYOS2G.js.map} +0 -0
  726. /package/dist/cli-bundle/chunks/{gc-JEFQDJPA.js.map → gc-LPVMKJQJ.js.map} +0 -0
  727. /package/dist/cli-bundle/chunks/{health-JJJOY7DJ.js.map → health-3IPFLKXB.js.map} +0 -0
  728. /package/dist/cli-bundle/chunks/{health-P67NZ6TT.js.map → health-GZXGBZ36.js.map} +0 -0
  729. /package/dist/cli-bundle/chunks/{history-redact-YY4XYVEP.js.map → history-NERDJNUB.js.map} +0 -0
  730. /package/dist/cli-bundle/chunks/{history-redact-5YGLWUDH.js.map → history-WSZHY3PN.js.map} +0 -0
  731. /package/dist/cli-bundle/chunks/{init-C4CRHW22.js.map → history-redact-MP6CH7U5.js.map} +0 -0
  732. /package/dist/cli-bundle/chunks/{init-HBFGYS66.js.map → history-redact-O3NBCNWC.js.map} +0 -0
  733. /package/dist/cli-bundle/chunks/{list-C7R33MD5.js.map → init-64XDLQJB.js.map} +0 -0
  734. /package/dist/cli-bundle/chunks/{list-DSN6UNFB.js.map → init-PAX32BJA.js.map} +0 -0
  735. /package/dist/cli-bundle/chunks/{restore-LL2WLEDG.js.map → list-DNBJVO3E.js.map} +0 -0
  736. /package/dist/cli-bundle/chunks/{restore-LQHXBAY5.js.map → list-G5Y65VF6.js.map} +0 -0
  737. /package/dist/cli-bundle/chunks/{search-2EI6EAXH.js.map → restore-4MHZFJ2E.js.map} +0 -0
  738. /package/dist/cli-bundle/chunks/{search-QBFBLQRO.js.map → restore-YALDGTQR.js.map} +0 -0
  739. /package/dist/cli-bundle/chunks/{test-NV2DRPUS.js.map → schema-73HR2OJW.js.map} +0 -0
  740. /package/dist/cli-bundle/chunks/{test-WA6RZGM2.js.map → schema-U6LJKSIR.js.map} +0 -0
  741. /package/dist/cli-bundle/chunks/{update-BSKMQOYH.js.map → search-AXPXKZER.js.map} +0 -0
  742. /package/dist/cli-bundle/chunks/{update-FIGYNQ2I.js.map → search-KILGT37L.js.map} +0 -0
  743. /package/dist/cli-bundle/chunks/{telemetry-BT2VSWU2.js.map → telemetry-BZUF6H7G.js.map} +0 -0
  744. /package/dist/cli-bundle/chunks/{telemetry-LQ6FRTUT.js.map → telemetry-GAHHQTOS.js.map} +0 -0
@@ -4,7 +4,7 @@
4
4
  * Implements extension package-management support for Bundled Catalog.
5
5
  */
6
6
 
7
- !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]="706494dc-d2f2-520c-9845-71326ee5841e")}catch(e){}}();
7
+ !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]="0baef9c6-cdf9-5aea-89f0-088600d538e6")}catch(e){}}();
8
8
  import fs from "node:fs/promises";
9
9
  import path from "node:path";
10
10
  import { collectPackageExtensionDirectories, PM_PACKAGE_RESOURCE_KINDS, readPmPackageManifest } from "../../../core/packages/manifest.js";
@@ -163,6 +163,61 @@ export async function resolveBundledAliasManifestName(input) {
163
163
  return null;
164
164
  }
165
165
  }
166
+ /**
167
+ * Resolve the catalog link block for a bundled package, preferring the explicit
168
+ * `catalog.links.*` manifest fields and falling back to the package's
169
+ * repository/bugs/homepage/npm metadata. The npm link is synthesized from the
170
+ * package name unless the package is private or unnamed.
171
+ */
172
+ function buildBundledCatalogLinks(manifest) {
173
+ return {
174
+ docs: manifest.catalog?.links?.docs ?? manifest.package_homepage,
175
+ npm: manifest.catalog?.links?.npm ??
176
+ (manifest.package_name && manifest.package_private !== true
177
+ ? `https://www.npmjs.com/package/${encodeURIComponent(manifest.package_name)}`
178
+ : undefined),
179
+ repository: manifest.catalog?.links?.repository ?? manifest.package_repository_url,
180
+ report: manifest.catalog?.links?.report ?? manifest.package_bugs_url,
181
+ };
182
+ }
183
+ /**
184
+ * Build one bundled-package catalog entry from its manifest, marking it
185
+ * `installed` when the managed state for `scope` already records the package by
186
+ * built-in alias or resolved location, and projecting the metadata-only resource
187
+ * kinds (everything except installable `extensions`) that the package ships.
188
+ */
189
+ function buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installedBuiltinAliases, installedLocations) {
190
+ const installScopeFlag = scope === "global" ? "--global" : "--project";
191
+ const metadataOnlyResources = Object.fromEntries(PM_PACKAGE_RESOURCE_KINDS
192
+ .filter((resourceKind) => resourceKind !== "extensions")
193
+ .map((resourceKind) => [resourceKind, manifest.resources[resourceKind] ?? []])
194
+ .filter(([, entries]) => Array.isArray(entries) && entries.length > 0));
195
+ return {
196
+ alias: bundledEntry.alias,
197
+ bundled: true,
198
+ available: true,
199
+ installed: installedBuiltinAliases.has(bundledEntry.alias) ||
200
+ installedLocations.has(path.resolve(bundledEntry.package_root)),
201
+ install_target: bundledEntry.alias,
202
+ install_command: `pm install ${bundledEntry.alias} ${installScopeFlag}`,
203
+ package_name: manifest.package_name,
204
+ package_version: manifest.package_version,
205
+ description: manifest.catalog?.summary ?? manifest.package_description,
206
+ keywords: manifest.package_keywords ?? [],
207
+ resources: manifest.resources,
208
+ installable_resources: {
209
+ extensions: manifest.resources.extensions ?? [],
210
+ },
211
+ metadata_only_resources: metadataOnlyResources,
212
+ catalog: {
213
+ display_name: manifest.catalog?.display_name,
214
+ category: manifest.catalog?.category,
215
+ tags: manifest.catalog?.tags ?? manifest.package_keywords ?? [],
216
+ links: buildBundledCatalogLinks(manifest),
217
+ media: manifest.catalog?.media,
218
+ },
219
+ };
220
+ }
166
221
  /**
167
222
  * Implements build bundled package catalog for the public runtime surface of this module.
168
223
  */
@@ -181,50 +236,8 @@ export async function buildBundledPackageCatalog(scope, global, options = {}) {
181
236
  .map((value) => value.trim().toLowerCase()));
182
237
  const packages = [];
183
238
  for (const bundledEntry of await collectBundledPackageEntries()) {
184
- const alias = bundledEntry.alias;
185
- const packageRoot = bundledEntry.package_root;
186
- const installScopeFlag = scope === "global" ? "--global" : "--project";
187
- const manifest = await readPmPackageManifest(packageRoot);
188
- const repository = manifest.catalog?.links?.repository ?? manifest.package_repository_url;
189
- const report = manifest.catalog?.links?.report ?? manifest.package_bugs_url;
190
- const docs = manifest.catalog?.links?.docs ?? manifest.package_homepage;
191
- const npm = manifest.catalog?.links?.npm ??
192
- (manifest.package_name && manifest.package_private !== true
193
- ? `https://www.npmjs.com/package/${encodeURIComponent(manifest.package_name)}`
194
- : undefined);
195
- const metadataOnlyResources = Object.fromEntries(PM_PACKAGE_RESOURCE_KINDS
196
- .filter((resourceKind) => resourceKind !== "extensions")
197
- .map((resourceKind) => [resourceKind, manifest.resources[resourceKind] ?? []])
198
- .filter(([, entries]) => Array.isArray(entries) && entries.length > 0));
199
- packages.push({
200
- alias,
201
- bundled: true,
202
- available: true,
203
- installed: installedBuiltinAliases.has(alias) || installedLocations.has(path.resolve(packageRoot)),
204
- install_target: alias,
205
- install_command: `pm install ${alias} ${installScopeFlag}`,
206
- package_name: manifest.package_name,
207
- package_version: manifest.package_version,
208
- description: manifest.catalog?.summary ?? manifest.package_description,
209
- keywords: manifest.package_keywords ?? [],
210
- resources: manifest.resources,
211
- installable_resources: {
212
- extensions: manifest.resources.extensions ?? [],
213
- },
214
- metadata_only_resources: metadataOnlyResources,
215
- catalog: {
216
- display_name: manifest.catalog?.display_name,
217
- category: manifest.catalog?.category,
218
- tags: manifest.catalog?.tags ?? manifest.package_keywords ?? [],
219
- links: {
220
- docs,
221
- npm,
222
- repository,
223
- report,
224
- },
225
- media: manifest.catalog?.media,
226
- },
227
- });
239
+ const manifest = await readPmPackageManifest(bundledEntry.package_root);
240
+ packages.push(buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installedBuiltinAliases, installedLocations));
228
241
  }
229
242
  const fields = parsePackageCatalogFields(options.fields);
230
243
  const outputPackages = fields ? packages.map((entry) => projectPackageCatalogEntry(entry, fields)) : packages;
@@ -293,4 +306,4 @@ export const _testOnlyBundledCatalog = {
293
306
  projectPackageCatalogEntry,
294
307
  };
295
308
  //# sourceMappingURL=bundled-catalog.js.map
296
- //# debugId=706494dc-d2f2-520c-9845-71326ee5841e
309
+ //# debugId=0baef9c6-cdf9-5aea-89f0-088600d538e6
@@ -1 +1 @@
1
- {"version":3,"file":"bundled-catalog.js","sources":["cli/commands/extension/bundled-catalog.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/extension/bundled-catalog\n *\n * Implements extension package-management support for Bundled Catalog.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { collectPackageExtensionDirectories, PM_PACKAGE_RESOURCE_KINDS, readPmPackageManifest } from \"../../../core/packages/manifest.js\";\nimport { resolvePmPackageRootFromModule } from \"../../../core/packages/root.js\";\nimport { pathExists } from \"../../../core/fs/fs-utils.js\";\nimport { EXIT_CODE } from \"../../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../../core/shared/split-comma-list.js\";\nimport { resolveExtensionRoots } from \"../../../core/extensions/loader.js\";\nimport { resolvePmRoot } from \"../../../core/store/paths.js\";\nimport { validateExtensionDirectory } from \"./shared.js\";\nimport { readManagedExtensionState } from \"./managed-state.js\";\nimport type { ExtensionCommandOptions, ExtensionScope } from \"../extension.js\";\n\nconst PM_PACKAGE_ROOT_ENV = \"PM_CLI_PACKAGE_ROOT\";\nconst LEGACY_BUNDLED_PACKAGE_ALIASES: Record<string, { package_directory: string; legacy_extension_directory: string }> = {\n beads: {\n package_directory: \"pm-beads\",\n legacy_extension_directory: \"beads\",\n },\n todos: {\n package_directory: \"pm-todos\",\n legacy_extension_directory: \"todos\",\n },\n};\nconst BUNDLED_PACKAGE_INSTALL_ALL_TARGETS = new Set([\"*\", \"all\"]);\n\ninterface BundledPackageEntry {\n alias: string;\n package_directory: string;\n package_root: string;\n}\n\nfunction resolvePackageRootCandidates(): string[] {\n const candidates: string[] = [];\n const envRoot = process.env[PM_PACKAGE_ROOT_ENV];\n /* c8 ignore start -- env-root override branch is exercised by package-root integration tests */\n if (typeof envRoot === \"string\" && envRoot.trim().length > 0) {\n candidates.push(path.resolve(envRoot.trim()));\n }\n /* c8 ignore stop */\n candidates.push(resolvePmPackageRootFromModule(import.meta.url, [\"../../../..\"]));\n return [...new Set(candidates)];\n}\n\n/**\n * Implements resolve bundled extension alias source for the public runtime surface of this module.\n */\nexport async function resolveBundledExtensionAliasSource(input: string): Promise<string | null> {\n const normalized = input.trim().toLowerCase();\n const packageRoot = await resolveBundledPackageRoot(normalized);\n if (packageRoot) {\n return packageRoot;\n }\n\n const alias = LEGACY_BUNDLED_PACKAGE_ALIASES[normalized];\n /* c8 ignore start -- known aliases resolve through package manifests in normal runtime */\n if (!alias) {\n return null;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- exercised only when legacy extension paths exist without package manifests */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const legacyExtensionPath = path.join(packageRoot, \".agents\", \"pm\", \"extensions\", alias.legacy_extension_directory);\n if (await pathExists(path.join(legacyExtensionPath, \"manifest.json\"))) {\n return legacyExtensionPath;\n }\n }\n return null;\n /* c8 ignore stop */\n}\n\n/**\n * Implements check whether bundled package install all target for the public runtime surface of this module.\n */\nexport function isBundledPackageInstallAllTarget(input: string): boolean {\n return BUNDLED_PACKAGE_INSTALL_ALL_TARGETS.has(input.trim().toLowerCase());\n}\n\nfunction derivePackageAlias(packageDirectory: string): string {\n return packageDirectory.replace(/^pm-/i, \"\").trim().toLowerCase();\n}\n\nasync function collectBundledPackageEntries(): Promise<BundledPackageEntry[]> {\n const entriesByAlias = new Map<string, BundledPackageEntry>();\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagesRoot = path.join(packageRoot, \"packages\");\n if (!(await pathExists(packagesRoot))) {\n continue;\n }\n const entries = await fs.readdir(packagesRoot, { withFileTypes: true });\n for (const entry of entries) {\n if (!entry.isDirectory() || !entry.name.startsWith(\"pm-\")) {\n continue;\n }\n const candidateRoot = path.join(packagesRoot, entry.name);\n if (!(await pathExists(path.join(candidateRoot, \"package.json\")))) {\n continue;\n }\n const manifest = await readPmPackageManifest(candidateRoot);\n const aliases = manifest.aliases && manifest.aliases.length > 0\n ? manifest.aliases\n : [derivePackageAlias(entry.name)];\n for (const alias of aliases) {\n const normalizedAlias = alias.trim().toLowerCase();\n if (normalizedAlias.length === 0 || entriesByAlias.has(normalizedAlias)) {\n continue;\n }\n entriesByAlias.set(normalizedAlias, {\n alias: normalizedAlias,\n package_directory: entry.name,\n package_root: candidateRoot,\n });\n }\n }\n }\n\n for (const [alias, legacy] of Object.entries(LEGACY_BUNDLED_PACKAGE_ALIASES)) {\n /* c8 ignore start -- canonical aliases are present in bundled package manifests */\n if (entriesByAlias.has(alias)) {\n continue;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- compatibility fallback when only legacy package layout exists */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagePath = path.join(packageRoot, \"packages\", legacy.package_directory);\n if (await pathExists(path.join(packagePath, \"package.json\"))) {\n entriesByAlias.set(alias, {\n alias,\n package_directory: legacy.package_directory,\n package_root: packagePath,\n });\n break;\n }\n }\n /* c8 ignore stop */\n }\n\n return [...entriesByAlias.values()].sort((left, right) => left.alias.localeCompare(right.alias));\n}\n\n/**\n * Implements list bundled package aliases for the public runtime surface of this module.\n */\nexport async function listBundledPackageAliases(): Promise<string[]> {\n return (await collectBundledPackageEntries()).map((entry) => entry.alias);\n}\n\n/**\n * Implements resolve bundled package root for the public runtime surface of this module.\n */\nexport async function resolveBundledPackageRoot(alias: string): Promise<string | null> {\n const normalized = alias.trim().toLowerCase();\n const entry = (await collectBundledPackageEntries()).find((candidate) => candidate.alias === normalized);\n return entry?.package_root ?? null;\n}\n\n/**\n * Implements resolve bundled alias manifest name for the public runtime surface of this module.\n */\nexport async function resolveBundledAliasManifestName(input: string): Promise<string | null> {\n const bundledAliasSource = await resolveBundledExtensionAliasSource(input);\n if (!bundledAliasSource) {\n return null;\n }\n try {\n const extensionDirectories = await collectPackageExtensionDirectories(bundledAliasSource);\n if (extensionDirectories.length !== 1) {\n return null;\n }\n const validated = await validateExtensionDirectory(extensionDirectories[0]);\n return validated.manifest.name;\n } catch {\n return null;\n }\n}\n\n/**\n * Implements build bundled package catalog for the public runtime surface of this module.\n */\nexport async function buildBundledPackageCatalog(scope: ExtensionScope, global: GlobalOptions, options: ExtensionCommandOptions = {}): Promise<{\n total: number;\n scope: ExtensionScope;\n installable_resource_kinds: string[];\n metadata_only_resource_kinds: string[];\n packages: Array<Record<string, unknown>>;\n}> {\n const roots = resolveExtensionRoots(resolvePmRoot(process.cwd(), global.path), process.cwd());\n const selectedRoot = scope === \"global\" ? roots.global : roots.project;\n const managedStateRead = await readManagedExtensionState(selectedRoot);\n const installedLocations = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope)\n .filter((entry) => entry.source.kind !== \"builtin\")\n .map((entry) => path.resolve(entry.source.location)),\n );\n const installedBuiltinAliases = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope && entry.source.kind === \"builtin\")\n .flatMap((entry) => [entry.source.name, entry.source.input, entry.source.location])\n .filter((value): value is string => typeof value === \"string\" && value.trim().length > 0)\n .map((value) => value.trim().toLowerCase()),\n );\n const packages: Array<Record<string, unknown>> = [];\n\n for (const bundledEntry of await collectBundledPackageEntries()) {\n const alias = bundledEntry.alias;\n const packageRoot = bundledEntry.package_root;\n const installScopeFlag = scope === \"global\" ? \"--global\" : \"--project\";\n\n const manifest = await readPmPackageManifest(packageRoot);\n const repository = manifest.catalog?.links?.repository ?? manifest.package_repository_url;\n const report = manifest.catalog?.links?.report ?? manifest.package_bugs_url;\n const docs = manifest.catalog?.links?.docs ?? manifest.package_homepage;\n const npm = manifest.catalog?.links?.npm ??\n (manifest.package_name && manifest.package_private !== true\n ? `https://www.npmjs.com/package/${encodeURIComponent(manifest.package_name)}`\n : undefined);\n const metadataOnlyResources = Object.fromEntries(\n PM_PACKAGE_RESOURCE_KINDS\n .filter((resourceKind) => resourceKind !== \"extensions\")\n .map((resourceKind) => [resourceKind, manifest.resources[resourceKind] ?? []])\n .filter(([, entries]) => Array.isArray(entries) && entries.length > 0),\n );\n packages.push({\n alias,\n bundled: true,\n available: true,\n installed: installedBuiltinAliases.has(alias) || installedLocations.has(path.resolve(packageRoot)),\n install_target: alias,\n install_command: `pm install ${alias} ${installScopeFlag}`,\n package_name: manifest.package_name,\n package_version: manifest.package_version,\n description: manifest.catalog?.summary ?? manifest.package_description,\n keywords: manifest.package_keywords ?? [],\n resources: manifest.resources,\n installable_resources: {\n extensions: manifest.resources.extensions ?? [],\n },\n metadata_only_resources: metadataOnlyResources,\n catalog: {\n display_name: manifest.catalog?.display_name,\n category: manifest.catalog?.category,\n tags: manifest.catalog?.tags ?? manifest.package_keywords ?? [],\n links: {\n docs,\n npm,\n repository,\n report,\n },\n media: manifest.catalog?.media,\n },\n });\n }\n\n const fields = parsePackageCatalogFields(options.fields);\n const outputPackages = fields ? packages.map((entry) => projectPackageCatalogEntry(entry, fields)) : packages;\n return {\n total: outputPackages.length,\n scope,\n installable_resource_kinds: [\"extensions\"],\n metadata_only_resource_kinds: PM_PACKAGE_RESOURCE_KINDS.filter((resourceKind) => resourceKind !== \"extensions\"),\n packages: outputPackages,\n };\n}\n\nconst PACKAGE_CATALOG_FIELD_KEYS = new Set([\n \"alias\",\n \"bundled\",\n \"available\",\n \"installed\",\n \"install_target\",\n \"install_command\",\n \"package_name\",\n \"package_version\",\n \"description\",\n \"keywords\",\n \"resources\",\n \"installable_resources\",\n \"metadata_only_resources\",\n \"catalog\",\n \"category\",\n \"display_name\",\n]);\n\nfunction parsePackageCatalogFields(raw: string | undefined): string[] | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const fields = splitCommaList(raw);\n if (fields.length === 0) {\n throw new PmCliError(\"Package catalog --fields requires a comma-separated list of field names\", EXIT_CODE.USAGE);\n }\n const unknown = fields.filter((field) => !PACKAGE_CATALOG_FIELD_KEYS.has(field));\n if (unknown.length > 0) {\n throw new PmCliError(`Unknown package catalog --fields value(s): ${unknown.join(\", \")}`, EXIT_CODE.USAGE, {\n examples: [\n \"pm package list --project --fields alias,installed,install_command\",\n \"pm package catalog --project --fields alias,package_name,category\",\n ],\n });\n }\n return fields;\n}\n\nfunction projectPackageCatalogEntry(entry: Record<string, unknown>, fields: string[]): Record<string, unknown> {\n const projected: Record<string, unknown> = {};\n for (const field of fields) {\n if (field === \"category\") {\n projected[field] = (entry.catalog as { category?: unknown } | undefined)?.category ?? null;\n } else if (field === \"display_name\") {\n projected[field] = (entry.catalog as { display_name?: unknown } | undefined)?.display_name ?? null;\n } else {\n projected[field] = entry[field] ?? null;\n }\n }\n return projected;\n}\n\nexport const _testOnlyBundledCatalog = {\n parsePackageCatalogFields,\n projectPackageCatalogEntry,\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kCAAkC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AAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,UAAU,CAAC,8CAA8C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,CAAC,KAAK,EAAE;YACxG,QAAQ,EAAE;gBACR,oEAAoE;gBACpE,mEAAmE;aACpE;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,0BAA0B,CAAC,KAA8B,EAAE,MAAgB;IAClF,MAAM,SAAS,GAA4B,EAAE,CAAC;IAC9C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;YACzB,SAAS,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,OAA8C,EAAE,QAAQ,IAAI,IAAI,CAAC;QAC7F,CAAC;aAAM,IAAI,KAAK,KAAK,cAAc,EAAE,CAAC;YACpC,SAAS,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,OAAkD,EAAE,YAAY,IAAI,IAAI,CAAC;QACrG,CAAC;aAAM,CAAC;YACN,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,yBAAyB;IACzB,0BAA0B;CAC3B,CAAC","debugId":"706494dc-d2f2-520c-9845-71326ee5841e"}
1
+ {"version":3,"file":"bundled-catalog.js","sources":["cli/commands/extension/bundled-catalog.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/extension/bundled-catalog\n *\n * Implements extension package-management support for Bundled Catalog.\n */\nimport fs from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { collectPackageExtensionDirectories, PM_PACKAGE_RESOURCE_KINDS, readPmPackageManifest } from \"../../../core/packages/manifest.js\";\nimport { resolvePmPackageRootFromModule } from \"../../../core/packages/root.js\";\nimport { pathExists } from \"../../../core/fs/fs-utils.js\";\nimport { EXIT_CODE } from \"../../../core/shared/constants.js\";\nimport type { GlobalOptions } from \"../../../core/shared/command-types.js\";\nimport { PmCliError } from \"../../../core/shared/errors.js\";\nimport { splitCommaList } from \"../../../core/shared/split-comma-list.js\";\nimport { resolveExtensionRoots } from \"../../../core/extensions/loader.js\";\nimport { resolvePmRoot } from \"../../../core/store/paths.js\";\nimport { validateExtensionDirectory } from \"./shared.js\";\nimport { readManagedExtensionState } from \"./managed-state.js\";\nimport type { ExtensionCommandOptions, ExtensionScope } from \"../extension.js\";\n\nconst PM_PACKAGE_ROOT_ENV = \"PM_CLI_PACKAGE_ROOT\";\nconst LEGACY_BUNDLED_PACKAGE_ALIASES: Record<string, { package_directory: string; legacy_extension_directory: string }> = {\n beads: {\n package_directory: \"pm-beads\",\n legacy_extension_directory: \"beads\",\n },\n todos: {\n package_directory: \"pm-todos\",\n legacy_extension_directory: \"todos\",\n },\n};\nconst BUNDLED_PACKAGE_INSTALL_ALL_TARGETS = new Set([\"*\", \"all\"]);\n\ninterface BundledPackageEntry {\n alias: string;\n package_directory: string;\n package_root: string;\n}\n\nfunction resolvePackageRootCandidates(): string[] {\n const candidates: string[] = [];\n const envRoot = process.env[PM_PACKAGE_ROOT_ENV];\n /* c8 ignore start -- env-root override branch is exercised by package-root integration tests */\n if (typeof envRoot === \"string\" && envRoot.trim().length > 0) {\n candidates.push(path.resolve(envRoot.trim()));\n }\n /* c8 ignore stop */\n candidates.push(resolvePmPackageRootFromModule(import.meta.url, [\"../../../..\"]));\n return [...new Set(candidates)];\n}\n\n/**\n * Implements resolve bundled extension alias source for the public runtime surface of this module.\n */\nexport async function resolveBundledExtensionAliasSource(input: string): Promise<string | null> {\n const normalized = input.trim().toLowerCase();\n const packageRoot = await resolveBundledPackageRoot(normalized);\n if (packageRoot) {\n return packageRoot;\n }\n\n const alias = LEGACY_BUNDLED_PACKAGE_ALIASES[normalized];\n /* c8 ignore start -- known aliases resolve through package manifests in normal runtime */\n if (!alias) {\n return null;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- exercised only when legacy extension paths exist without package manifests */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const legacyExtensionPath = path.join(packageRoot, \".agents\", \"pm\", \"extensions\", alias.legacy_extension_directory);\n if (await pathExists(path.join(legacyExtensionPath, \"manifest.json\"))) {\n return legacyExtensionPath;\n }\n }\n return null;\n /* c8 ignore stop */\n}\n\n/**\n * Implements check whether bundled package install all target for the public runtime surface of this module.\n */\nexport function isBundledPackageInstallAllTarget(input: string): boolean {\n return BUNDLED_PACKAGE_INSTALL_ALL_TARGETS.has(input.trim().toLowerCase());\n}\n\nfunction derivePackageAlias(packageDirectory: string): string {\n return packageDirectory.replace(/^pm-/i, \"\").trim().toLowerCase();\n}\n\nasync function collectBundledPackageEntries(): Promise<BundledPackageEntry[]> {\n const entriesByAlias = new Map<string, BundledPackageEntry>();\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagesRoot = path.join(packageRoot, \"packages\");\n if (!(await pathExists(packagesRoot))) {\n continue;\n }\n const entries = await fs.readdir(packagesRoot, { withFileTypes: true });\n for (const entry of entries) {\n if (!entry.isDirectory() || !entry.name.startsWith(\"pm-\")) {\n continue;\n }\n const candidateRoot = path.join(packagesRoot, entry.name);\n if (!(await pathExists(path.join(candidateRoot, \"package.json\")))) {\n continue;\n }\n const manifest = await readPmPackageManifest(candidateRoot);\n const aliases = manifest.aliases && manifest.aliases.length > 0\n ? manifest.aliases\n : [derivePackageAlias(entry.name)];\n for (const alias of aliases) {\n const normalizedAlias = alias.trim().toLowerCase();\n if (normalizedAlias.length === 0 || entriesByAlias.has(normalizedAlias)) {\n continue;\n }\n entriesByAlias.set(normalizedAlias, {\n alias: normalizedAlias,\n package_directory: entry.name,\n package_root: candidateRoot,\n });\n }\n }\n }\n\n for (const [alias, legacy] of Object.entries(LEGACY_BUNDLED_PACKAGE_ALIASES)) {\n /* c8 ignore start -- canonical aliases are present in bundled package manifests */\n if (entriesByAlias.has(alias)) {\n continue;\n }\n /* c8 ignore stop */\n /* c8 ignore start -- compatibility fallback when only legacy package layout exists */\n for (const packageRoot of resolvePackageRootCandidates()) {\n const packagePath = path.join(packageRoot, \"packages\", legacy.package_directory);\n if (await pathExists(path.join(packagePath, \"package.json\"))) {\n entriesByAlias.set(alias, {\n alias,\n package_directory: legacy.package_directory,\n package_root: packagePath,\n });\n break;\n }\n }\n /* c8 ignore stop */\n }\n\n return [...entriesByAlias.values()].sort((left, right) => left.alias.localeCompare(right.alias));\n}\n\n/**\n * Implements list bundled package aliases for the public runtime surface of this module.\n */\nexport async function listBundledPackageAliases(): Promise<string[]> {\n return (await collectBundledPackageEntries()).map((entry) => entry.alias);\n}\n\n/**\n * Implements resolve bundled package root for the public runtime surface of this module.\n */\nexport async function resolveBundledPackageRoot(alias: string): Promise<string | null> {\n const normalized = alias.trim().toLowerCase();\n const entry = (await collectBundledPackageEntries()).find((candidate) => candidate.alias === normalized);\n return entry?.package_root ?? null;\n}\n\n/**\n * Implements resolve bundled alias manifest name for the public runtime surface of this module.\n */\nexport async function resolveBundledAliasManifestName(input: string): Promise<string | null> {\n const bundledAliasSource = await resolveBundledExtensionAliasSource(input);\n if (!bundledAliasSource) {\n return null;\n }\n try {\n const extensionDirectories = await collectPackageExtensionDirectories(bundledAliasSource);\n if (extensionDirectories.length !== 1) {\n return null;\n }\n const validated = await validateExtensionDirectory(extensionDirectories[0]);\n return validated.manifest.name;\n } catch {\n return null;\n }\n}\n\n/**\n * Resolve the catalog link block for a bundled package, preferring the explicit\n * `catalog.links.*` manifest fields and falling back to the package's\n * repository/bugs/homepage/npm metadata. The npm link is synthesized from the\n * package name unless the package is private or unnamed.\n */\nfunction buildBundledCatalogLinks(manifest: Awaited<ReturnType<typeof readPmPackageManifest>>): {\n docs: string | undefined;\n npm: string | undefined;\n repository: string | undefined;\n report: string | undefined;\n} {\n return {\n docs: manifest.catalog?.links?.docs ?? manifest.package_homepage,\n npm:\n manifest.catalog?.links?.npm ??\n (manifest.package_name && manifest.package_private !== true\n ? `https://www.npmjs.com/package/${encodeURIComponent(manifest.package_name)}`\n : undefined),\n repository: manifest.catalog?.links?.repository ?? manifest.package_repository_url,\n report: manifest.catalog?.links?.report ?? manifest.package_bugs_url,\n };\n}\n\n/**\n * Build one bundled-package catalog entry from its manifest, marking it\n * `installed` when the managed state for `scope` already records the package by\n * built-in alias or resolved location, and projecting the metadata-only resource\n * kinds (everything except installable `extensions`) that the package ships.\n */\nfunction buildBundledCatalogPackageEntry(\n manifest: Awaited<ReturnType<typeof readPmPackageManifest>>,\n bundledEntry: BundledPackageEntry,\n scope: ExtensionScope,\n installedBuiltinAliases: Set<string>,\n installedLocations: Set<string>,\n): Record<string, unknown> {\n const installScopeFlag = scope === \"global\" ? \"--global\" : \"--project\";\n const metadataOnlyResources = Object.fromEntries(\n PM_PACKAGE_RESOURCE_KINDS\n .filter((resourceKind) => resourceKind !== \"extensions\")\n .map((resourceKind) => [resourceKind, manifest.resources[resourceKind] ?? []])\n .filter(([, entries]) => Array.isArray(entries) && entries.length > 0),\n );\n return {\n alias: bundledEntry.alias,\n bundled: true,\n available: true,\n installed:\n installedBuiltinAliases.has(bundledEntry.alias) ||\n installedLocations.has(path.resolve(bundledEntry.package_root)),\n install_target: bundledEntry.alias,\n install_command: `pm install ${bundledEntry.alias} ${installScopeFlag}`,\n package_name: manifest.package_name,\n package_version: manifest.package_version,\n description: manifest.catalog?.summary ?? manifest.package_description,\n keywords: manifest.package_keywords ?? [],\n resources: manifest.resources,\n installable_resources: {\n extensions: manifest.resources.extensions ?? [],\n },\n metadata_only_resources: metadataOnlyResources,\n catalog: {\n display_name: manifest.catalog?.display_name,\n category: manifest.catalog?.category,\n tags: manifest.catalog?.tags ?? manifest.package_keywords ?? [],\n links: buildBundledCatalogLinks(manifest),\n media: manifest.catalog?.media,\n },\n };\n}\n\n/**\n * Implements build bundled package catalog for the public runtime surface of this module.\n */\nexport async function buildBundledPackageCatalog(scope: ExtensionScope, global: GlobalOptions, options: ExtensionCommandOptions = {}): Promise<{\n total: number;\n scope: ExtensionScope;\n installable_resource_kinds: string[];\n metadata_only_resource_kinds: string[];\n packages: Array<Record<string, unknown>>;\n}> {\n const roots = resolveExtensionRoots(resolvePmRoot(process.cwd(), global.path), process.cwd());\n const selectedRoot = scope === \"global\" ? roots.global : roots.project;\n const managedStateRead = await readManagedExtensionState(selectedRoot);\n const installedLocations = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope)\n .filter((entry) => entry.source.kind !== \"builtin\")\n .map((entry) => path.resolve(entry.source.location)),\n );\n const installedBuiltinAliases = new Set(\n managedStateRead.state.entries\n .filter((entry) => entry.scope === scope && entry.source.kind === \"builtin\")\n .flatMap((entry) => [entry.source.name, entry.source.input, entry.source.location])\n .filter((value): value is string => typeof value === \"string\" && value.trim().length > 0)\n .map((value) => value.trim().toLowerCase()),\n );\n const packages: Array<Record<string, unknown>> = [];\n\n for (const bundledEntry of await collectBundledPackageEntries()) {\n const manifest = await readPmPackageManifest(bundledEntry.package_root);\n packages.push(\n buildBundledCatalogPackageEntry(manifest, bundledEntry, scope, installedBuiltinAliases, installedLocations),\n );\n }\n\n const fields = parsePackageCatalogFields(options.fields);\n const outputPackages = fields ? packages.map((entry) => projectPackageCatalogEntry(entry, fields)) : packages;\n return {\n total: outputPackages.length,\n scope,\n installable_resource_kinds: [\"extensions\"],\n metadata_only_resource_kinds: PM_PACKAGE_RESOURCE_KINDS.filter((resourceKind) => resourceKind !== \"extensions\"),\n packages: outputPackages,\n };\n}\n\nconst PACKAGE_CATALOG_FIELD_KEYS = new Set([\n \"alias\",\n \"bundled\",\n \"available\",\n \"installed\",\n \"install_target\",\n \"install_command\",\n \"package_name\",\n \"package_version\",\n \"description\",\n \"keywords\",\n \"resources\",\n \"installable_resources\",\n \"metadata_only_resources\",\n \"catalog\",\n \"category\",\n \"display_name\",\n]);\n\nfunction parsePackageCatalogFields(raw: string | undefined): string[] | undefined {\n if (raw === undefined) {\n return undefined;\n }\n const fields = splitCommaList(raw);\n if (fields.length === 0) {\n throw new PmCliError(\"Package catalog --fields requires a comma-separated list of field names\", EXIT_CODE.USAGE);\n }\n const unknown = fields.filter((field) => !PACKAGE_CATALOG_FIELD_KEYS.has(field));\n if (unknown.length > 0) {\n throw new PmCliError(`Unknown package catalog --fields value(s): ${unknown.join(\", \")}`, EXIT_CODE.USAGE, {\n examples: [\n \"pm package list --project --fields alias,installed,install_command\",\n \"pm package catalog --project --fields alias,package_name,category\",\n ],\n });\n }\n return fields;\n}\n\nfunction projectPackageCatalogEntry(entry: Record<string, unknown>, fields: string[]): Record<string, unknown> {\n const projected: Record<string, unknown> = {};\n for (const field of fields) {\n if (field === \"category\") {\n projected[field] = (entry.catalog as { category?: unknown } | undefined)?.category ?? null;\n } else if (field === \"display_name\") {\n projected[field] = (entry.catalog as { display_name?: unknown } | undefined)?.display_name ?? null;\n } else {\n projected[field] = entry[field] ?? null;\n }\n }\n return projected;\n}\n\nexport const _testOnlyBundledCatalog = {\n parsePackageCatalogFields,\n projectPackageCatalogEntry,\n};\n"],"names":[],"mappings":"AAAA;;;;GAIG;;;AACH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kCAAkC,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC1I,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,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AAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,0BAA0B,CAAC,KAA8B,EAAE,MAAgB;IAClF,MAAM,SAAS,GAA4B,EAAE,CAAC;IAC9C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,KAAK,KAAK,UAAU,EAAE,CAAC;YACzB,SAAS,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,OAA8C,EAAE,QAAQ,IAAI,IAAI,CAAC;QAC7F,CAAC;aAAM,IAAI,KAAK,KAAK,cAAc,EAAE,CAAC;YACpC,SAAS,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,OAAkD,EAAE,YAAY,IAAI,IAAI,CAAC;QACrG,CAAC;aAAM,CAAC;YACN,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;QAC1C,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,yBAAyB;IACzB,0BAA0B;CAC3B,CAAC","debugId":"0baef9c6-cdf9-5aea-89f0-088600d538e6"}
@@ -68,3 +68,18 @@ export interface ExtensionDescribeResult {
68
68
  * whether that is a not-found error.
69
69
  */
70
70
  export declare function buildExtensionDescribeResult(target: string | undefined, loadResult: ExtensionLoadResult, activationResult: ExtensionActivationResult): ExtensionDescribeResult;
71
+ /**
72
+ * Render an {@link ExtensionDescribeResult} as a Markdown reference document: a
73
+ * top-level title and scope line, one section per described extension (titled
74
+ * with its identity and activation status), and — only when more than one
75
+ * extension was described — a final union section spanning them all. Each
76
+ * extension and the union are rendered with the shared
77
+ * {@link renderExtensionSurfaceMarkdown} primitive at heading level 2, so the
78
+ * document nests cleanly under the level-1 title.
79
+ *
80
+ * `noun` is the lifecycle vocabulary (`"extension"` or `"package"`) so the prose
81
+ * matches the command the agent invoked. When no extensions match (an unmatched
82
+ * target is already a not-found error upstream, so this is the "nothing loaded"
83
+ * case) the document is the title plus a single explanatory note.
84
+ */
85
+ export declare function renderExtensionDescribeMarkdown(result: ExtensionDescribeResult, noun: string): string;
@@ -17,8 +17,9 @@
17
17
  * builder is trivially unit-testable against synthetic activations.
18
18
  */
19
19
 
20
- !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]="7a92163a-99b2-5969-acc2-e2b6b0336c2e")}catch(e){}}();
20
+ !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]="e32f1159-a3b3-5c1f-903f-c0ed2d4cf458")}catch(e){}}();
21
21
  import { describeExtensionActivation } from "../../../core/extensions/activation-summary.js";
22
+ import { renderExtensionSurfaceMarkdown } from "../../../core/extensions/activation-summary-markdown.js";
22
23
  import { normalizeExtensionNameForMatch } from "./shared.js";
23
24
  /**
24
25
  * Compose a collision-free identity key for an extension from its layer and
@@ -72,5 +73,50 @@ export function buildExtensionDescribeResult(target, loadResult, activationResul
72
73
  union: describeExtensionActivation(activationResult, normalizedTarget === null ? {} : { extensionName: target }),
73
74
  };
74
75
  }
76
+ /**
77
+ * Human-readable label for each {@link ExtensionDescribeActivationStatus}, used
78
+ * in the Markdown per-extension heading so a reader sees *why* an entry has no
79
+ * surfaces (activation failed / never loaded) rather than assuming it
80
+ * contributes nothing.
81
+ */
82
+ const ACTIVATION_STATUS_LABELS = {
83
+ ok: "loaded",
84
+ failed: "activation failed",
85
+ not_loaded: "not loaded",
86
+ };
87
+ /**
88
+ * Render an {@link ExtensionDescribeResult} as a Markdown reference document: a
89
+ * top-level title and scope line, one section per described extension (titled
90
+ * with its identity and activation status), and — only when more than one
91
+ * extension was described — a final union section spanning them all. Each
92
+ * extension and the union are rendered with the shared
93
+ * {@link renderExtensionSurfaceMarkdown} primitive at heading level 2, so the
94
+ * document nests cleanly under the level-1 title.
95
+ *
96
+ * `noun` is the lifecycle vocabulary (`"extension"` or `"package"`) so the prose
97
+ * matches the command the agent invoked. When no extensions match (an unmatched
98
+ * target is already a not-found error upstream, so this is the "nothing loaded"
99
+ * case) the document is the title plus a single explanatory note.
100
+ */
101
+ export function renderExtensionDescribeMarkdown(result, noun) {
102
+ const titleNoun = `${noun[0].toUpperCase()}${noun.slice(1)}`;
103
+ const lines = [`# ${titleNoun} surface reference`, ""];
104
+ lines.push(result.target === null ? `Scope: all loaded ${noun}s` : `Scope: \`${result.target}\``);
105
+ lines.push(`Described: ${result.total} ${noun}${result.total === 1 ? "" : "s"}`, "");
106
+ if (result.extensions.length === 0) {
107
+ lines.push(`_No ${noun}s are loaded._`, "");
108
+ return `${lines.join("\n").trimEnd()}\n`;
109
+ }
110
+ for (const entry of result.extensions) {
111
+ const title = `${entry.name} (${entry.layer} v${entry.version}, ${ACTIVATION_STATUS_LABELS[entry.activation_status]})`;
112
+ // renderExtensionSurfaceMarkdown already ends with a newline; the join adds a
113
+ // single blank line between sections, so no extra "" separator is pushed.
114
+ lines.push(renderExtensionSurfaceMarkdown(entry.surfaces, { title, headingLevel: 2 }));
115
+ }
116
+ if (result.extensions.length > 1) {
117
+ lines.push(renderExtensionSurfaceMarkdown(result.union, { title: `Union across all described ${noun}s`, headingLevel: 2 }));
118
+ }
119
+ return `${lines.join("\n").trimEnd()}\n`;
120
+ }
75
121
  //# sourceMappingURL=describe.js.map
76
- //# debugId=7a92163a-99b2-5969-acc2-e2b6b0336c2e
122
+ //# debugId=e32f1159-a3b3-5c1f-903f-c0ed2d4cf458
@@ -1 +1 @@
1
- {"version":3,"file":"describe.js","sources":["cli/commands/extension/describe.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/extension/describe\n *\n * Builds the `pm extension describe` / `pm package describe` payload: a flat,\n * by-name map of every surface each loaded extension registered.\n *\n * The SDK already ships {@link describeExtensionActivation} -- the `describe`\n * (enumerate-all) verb that complements the `assert*` (verify-one) and `run*`\n * (invoke-one) testing helpers -- but until now it was reachable only from a test\n * that hand-built an {@link ExtensionActivationResult}. This module is the thin\n * orchestration that lets an agent at the CLI (or over MCP) ask \"what does this\n * installed extension add to my context?\" in one call, instead of stitching\n * together `doctor` (errors), `manage` (update metadata), and a manifest read.\n *\n * It is intentionally pure: the caller performs the load+activate cycle (exactly\n * as `explore`/`doctor` already do) and hands the results here, so the same\n * builder is trivially unit-testable against synthetic activations.\n */\nimport { describeExtensionActivation, type ExtensionActivationSummary } from \"../../../core/extensions/activation-summary.js\";\nimport type { ExtensionActivationResult, ExtensionLayer, ExtensionLoadResult } from \"../../../core/extensions/loader.js\";\nimport { normalizeExtensionNameForMatch } from \"./shared.js\";\n\n/**\n * Runtime state of a described extension. `ok` loaded and activated cleanly,\n * `failed` loaded but threw during `activate`, and `not_loaded` failed to import\n * at all -- the latter two register nothing, so their `surfaces` are empty and\n * the status explains why (rather than implying the extension contributes\n * nothing).\n */\nexport type ExtensionDescribeActivationStatus = \"ok\" | \"failed\" | \"not_loaded\";\n\n/**\n * One extension's contribution to the workspace: its identity plus the\n * {@link ExtensionActivationSummary} of every surface it registered.\n *\n * `surfaces` is matched by extension *name* (mirroring\n * {@link describeExtensionActivation}'s name filter), so when the same name is\n * loaded in both the project and global layers each entry reflects that name's\n * combined surfaces -- the `layer`/`version` fields still distinguish the\n * physical entries.\n */\nexport interface ExtensionSurfaceDescription {\n name: string;\n layer: ExtensionLayer;\n version: string;\n activation_status: ExtensionDescribeActivationStatus;\n surfaces: ExtensionActivationSummary;\n}\n\n/**\n * Result of {@link buildExtensionDescribeResult}: the per-extension surface maps\n * plus a deduplicated `union` across the described set. `target` echoes the\n * requested name filter (or `null` for the whole workspace) and `total` counts\n * the described entries so callers need not re-measure `extensions`.\n */\nexport interface ExtensionDescribeResult {\n target: string | null;\n total: number;\n extensions: ExtensionSurfaceDescription[];\n union: ExtensionActivationSummary;\n}\n\n/**\n * Compose a collision-free identity key for an extension from its layer and\n * normalized name. The two parts are joined with a colon; the layer prefix is\n * always a colon-free enum value, so distinct (layer, name) pairs never collide\n * even when a name itself contains a colon.\n */\nfunction layerNameKey(layer: ExtensionLayer, name: string): string {\n return `${layer}:${normalizeExtensionNameForMatch(name)}`;\n}\n\n/**\n * Summarize, by name, every registration surface the loaded extensions exercised.\n *\n * Walks `loadResult.loaded` (annotating each with `failed` when its layer+name is\n * in `activationResult.failed`) and `loadResult.failed` (as `not_loaded`), sorts\n * the entries by name then layer for deterministic output, and attaches each\n * extension's {@link describeExtensionActivation} summary. When `target` is\n * provided only the case-insensitively matching extensions are described and the\n * `union` is scoped to that name; otherwise every loaded extension contributes.\n * An unmatched `target` yields an empty `extensions` array -- the caller decides\n * whether that is a not-found error.\n */\nexport function buildExtensionDescribeResult(\n target: string | undefined,\n loadResult: ExtensionLoadResult,\n activationResult: ExtensionActivationResult,\n): ExtensionDescribeResult {\n const activationFailedKeys = new Set(activationResult.failed.map((entry) => layerNameKey(entry.layer, entry.name)));\n const candidates: ExtensionSurfaceDescription[] = [\n ...loadResult.loaded.map((entry) => ({\n name: entry.name,\n layer: entry.layer,\n version: entry.version,\n activation_status: activationFailedKeys.has(layerNameKey(entry.layer, entry.name))\n ? (\"failed\" as const)\n : (\"ok\" as const),\n surfaces: describeExtensionActivation(activationResult, { extensionName: entry.name }),\n })),\n ...loadResult.failed.map((entry) => ({\n name: entry.name,\n layer: entry.layer,\n version: \"unknown\",\n activation_status: \"not_loaded\" as const,\n surfaces: describeExtensionActivation(activationResult, { extensionName: entry.name }),\n })),\n ].sort((left, right) => left.name.localeCompare(right.name) || left.layer.localeCompare(right.layer));\n\n const normalizedTarget = typeof target === \"string\" ? normalizeExtensionNameForMatch(target) : null;\n const extensions =\n normalizedTarget === null\n ? candidates\n : candidates.filter((entry) => normalizeExtensionNameForMatch(entry.name) === normalizedTarget);\n\n return {\n target: typeof target === \"string\" ? target.trim() : null,\n total: extensions.length,\n extensions,\n union: describeExtensionActivation(activationResult, normalizedTarget === null ? {} : { extensionName: target }),\n };\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AACH,OAAO,EAAE,2BAA2B,EAAmC,MAAM,gDAAgD,CAAC;AAE9H,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AA0C7D;;;;;GAKG;AACH,SAAS,YAAY,CAAC,KAAqB,EAAE,IAAY;IACvD,OAAO,GAAG,KAAK,IAAI,8BAA8B,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5D,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,4BAA4B,CAC1C,MAA0B,EAC1B,UAA+B,EAC/B,gBAA2C;IAE3C,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpH,MAAM,UAAU,GAAkC;QAChD,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACnC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;gBAChF,CAAC,CAAE,QAAkB;gBACrB,CAAC,CAAE,IAAc;YACnB,QAAQ,EAAE,2BAA2B,CAAC,gBAAgB,EAAE,EAAE,aAAa,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;SACvF,CAAC,CAAC;QACH,GAAG,UAAU,C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"file":"describe.js","sources":["cli/commands/extension/describe.ts"],"sourceRoot":"/","sourcesContent":["/**\n * @module cli/commands/extension/describe\n *\n * Builds the `pm extension describe` / `pm package describe` payload: a flat,\n * by-name map of every surface each loaded extension registered.\n *\n * The SDK already ships {@link describeExtensionActivation} -- the `describe`\n * (enumerate-all) verb that complements the `assert*` (verify-one) and `run*`\n * (invoke-one) testing helpers -- but until now it was reachable only from a test\n * that hand-built an {@link ExtensionActivationResult}. This module is the thin\n * orchestration that lets an agent at the CLI (or over MCP) ask \"what does this\n * installed extension add to my context?\" in one call, instead of stitching\n * together `doctor` (errors), `manage` (update metadata), and a manifest read.\n *\n * It is intentionally pure: the caller performs the load+activate cycle (exactly\n * as `explore`/`doctor` already do) and hands the results here, so the same\n * builder is trivially unit-testable against synthetic activations.\n */\nimport { describeExtensionActivation, type ExtensionActivationSummary } from \"../../../core/extensions/activation-summary.js\";\nimport { renderExtensionSurfaceMarkdown } from \"../../../core/extensions/activation-summary-markdown.js\";\nimport type { ExtensionActivationResult, ExtensionLayer, ExtensionLoadResult } from \"../../../core/extensions/loader.js\";\nimport { normalizeExtensionNameForMatch } from \"./shared.js\";\n\n/**\n * Runtime state of a described extension. `ok` loaded and activated cleanly,\n * `failed` loaded but threw during `activate`, and `not_loaded` failed to import\n * at all -- the latter two register nothing, so their `surfaces` are empty and\n * the status explains why (rather than implying the extension contributes\n * nothing).\n */\nexport type ExtensionDescribeActivationStatus = \"ok\" | \"failed\" | \"not_loaded\";\n\n/**\n * One extension's contribution to the workspace: its identity plus the\n * {@link ExtensionActivationSummary} of every surface it registered.\n *\n * `surfaces` is matched by extension *name* (mirroring\n * {@link describeExtensionActivation}'s name filter), so when the same name is\n * loaded in both the project and global layers each entry reflects that name's\n * combined surfaces -- the `layer`/`version` fields still distinguish the\n * physical entries.\n */\nexport interface ExtensionSurfaceDescription {\n name: string;\n layer: ExtensionLayer;\n version: string;\n activation_status: ExtensionDescribeActivationStatus;\n surfaces: ExtensionActivationSummary;\n}\n\n/**\n * Result of {@link buildExtensionDescribeResult}: the per-extension surface maps\n * plus a deduplicated `union` across the described set. `target` echoes the\n * requested name filter (or `null` for the whole workspace) and `total` counts\n * the described entries so callers need not re-measure `extensions`.\n */\nexport interface ExtensionDescribeResult {\n target: string | null;\n total: number;\n extensions: ExtensionSurfaceDescription[];\n union: ExtensionActivationSummary;\n}\n\n/**\n * Compose a collision-free identity key for an extension from its layer and\n * normalized name. The two parts are joined with a colon; the layer prefix is\n * always a colon-free enum value, so distinct (layer, name) pairs never collide\n * even when a name itself contains a colon.\n */\nfunction layerNameKey(layer: ExtensionLayer, name: string): string {\n return `${layer}:${normalizeExtensionNameForMatch(name)}`;\n}\n\n/**\n * Summarize, by name, every registration surface the loaded extensions exercised.\n *\n * Walks `loadResult.loaded` (annotating each with `failed` when its layer+name is\n * in `activationResult.failed`) and `loadResult.failed` (as `not_loaded`), sorts\n * the entries by name then layer for deterministic output, and attaches each\n * extension's {@link describeExtensionActivation} summary. When `target` is\n * provided only the case-insensitively matching extensions are described and the\n * `union` is scoped to that name; otherwise every loaded extension contributes.\n * An unmatched `target` yields an empty `extensions` array -- the caller decides\n * whether that is a not-found error.\n */\nexport function buildExtensionDescribeResult(\n target: string | undefined,\n loadResult: ExtensionLoadResult,\n activationResult: ExtensionActivationResult,\n): ExtensionDescribeResult {\n const activationFailedKeys = new Set(activationResult.failed.map((entry) => layerNameKey(entry.layer, entry.name)));\n const candidates: ExtensionSurfaceDescription[] = [\n ...loadResult.loaded.map((entry) => ({\n name: entry.name,\n layer: entry.layer,\n version: entry.version,\n activation_status: activationFailedKeys.has(layerNameKey(entry.layer, entry.name))\n ? (\"failed\" as const)\n : (\"ok\" as const),\n surfaces: describeExtensionActivation(activationResult, { extensionName: entry.name }),\n })),\n ...loadResult.failed.map((entry) => ({\n name: entry.name,\n layer: entry.layer,\n version: \"unknown\",\n activation_status: \"not_loaded\" as const,\n surfaces: describeExtensionActivation(activationResult, { extensionName: entry.name }),\n })),\n ].sort((left, right) => left.name.localeCompare(right.name) || left.layer.localeCompare(right.layer));\n\n const normalizedTarget = typeof target === \"string\" ? normalizeExtensionNameForMatch(target) : null;\n const extensions =\n normalizedTarget === null\n ? candidates\n : candidates.filter((entry) => normalizeExtensionNameForMatch(entry.name) === normalizedTarget);\n\n return {\n target: typeof target === \"string\" ? target.trim() : null,\n total: extensions.length,\n extensions,\n union: describeExtensionActivation(activationResult, normalizedTarget === null ? {} : { extensionName: target }),\n };\n}\n\n/**\n * Human-readable label for each {@link ExtensionDescribeActivationStatus}, used\n * in the Markdown per-extension heading so a reader sees *why* an entry has no\n * surfaces (activation failed / never loaded) rather than assuming it\n * contributes nothing.\n */\nconst ACTIVATION_STATUS_LABELS: Record<ExtensionDescribeActivationStatus, string> = {\n ok: \"loaded\",\n failed: \"activation failed\",\n not_loaded: \"not loaded\",\n};\n\n/**\n * Render an {@link ExtensionDescribeResult} as a Markdown reference document: a\n * top-level title and scope line, one section per described extension (titled\n * with its identity and activation status), and — only when more than one\n * extension was described — a final union section spanning them all. Each\n * extension and the union are rendered with the shared\n * {@link renderExtensionSurfaceMarkdown} primitive at heading level 2, so the\n * document nests cleanly under the level-1 title.\n *\n * `noun` is the lifecycle vocabulary (`\"extension\"` or `\"package\"`) so the prose\n * matches the command the agent invoked. When no extensions match (an unmatched\n * target is already a not-found error upstream, so this is the \"nothing loaded\"\n * case) the document is the title plus a single explanatory note.\n */\nexport function renderExtensionDescribeMarkdown(result: ExtensionDescribeResult, noun: string): string {\n const titleNoun = `${noun[0]!.toUpperCase()}${noun.slice(1)}`;\n const lines = [`# ${titleNoun} surface reference`, \"\"];\n lines.push(result.target === null ? `Scope: all loaded ${noun}s` : `Scope: \\`${result.target}\\``);\n lines.push(`Described: ${result.total} ${noun}${result.total === 1 ? \"\" : \"s\"}`, \"\");\n\n if (result.extensions.length === 0) {\n lines.push(`_No ${noun}s are loaded._`, \"\");\n return `${lines.join(\"\\n\").trimEnd()}\\n`;\n }\n\n for (const entry of result.extensions) {\n const title = `${entry.name} (${entry.layer} v${entry.version}, ${ACTIVATION_STATUS_LABELS[entry.activation_status]})`;\n // renderExtensionSurfaceMarkdown already ends with a newline; the join adds a\n // single blank line between sections, so no extra \"\" separator is pushed.\n lines.push(renderExtensionSurfaceMarkdown(entry.surfaces, { title, headingLevel: 2 }));\n }\n\n if (result.extensions.length > 1) {\n lines.push(renderExtensionSurfaceMarkdown(result.union, { title: `Union across all described ${noun}s`, headingLevel: 2 }));\n }\n\n return `${lines.join(\"\\n\").trimEnd()}\\n`;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AACH,OAAO,EAAE,2BAA2B,EAAmC,MAAM,gDAAgD,CAAC;AAC9H,OAAO,EAAE,8BAA8B,EAAE,MAAM,yDAAyD,CAAC;AAEzG,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AA0C7D;;;;;GAKG;AACH,SAAS,YAAY,CAAC,KAAqB,EAAE,IAAY;IACvD,OAAO,GAAG,KAAK,IAAI,8BAA8B,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5D,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,4BAA4B,CAC1C,MAA0B,EAC1B,UAA+B,EAC/B,gBAA2C;IAE3C,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpH,MAAM,UAAU,GAAkC;QAChD,GAAG,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACnC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,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,UAAU,EAAE,CAAC;QACtC,MAAM,KAAK,GAAG,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,KAAK,wBAAwB,CAAC,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC;QACvH,8EAA8E;QAC9E,0EAA0E;QAC1E,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IACzF,CAAC;IAED,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjC,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,8BAA8B,IAAI,GAAG,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9H,CAAC;IAED,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC;AAC3C,CAAC","debugId":"e32f1159-a3b3-5c1f-903f-c0ed2d4cf458"}
@@ -4,7 +4,7 @@
4
4
  * Implements extension package-management support for Doctor.
5
5
  */
6
6
 
7
- !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]="52b725dc-48e3-5436-8136-47e5314b07eb")}catch(e){}}();
7
+ !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]="391a9e4b-f4b7-5176-970b-6de9523822e7")}catch(e){}}();
8
8
  import { reconcileExtensionCapabilityUsage, } from "../../../core/extensions/index.js";
9
9
  import { EXTENSION_CAPABILITY_CONTRACT, KNOWN_EXTENSION_CAPABILITIES, parseLegacyExtensionCapabilityAliasWarning, parseUnknownExtensionCapabilityWarning, } from "../../../core/extensions/loader.js";
10
10
  import { EXIT_CODE } from "../../../core/shared/constants.js";
@@ -303,6 +303,121 @@ export function classifyUnusedCapabilityWarnings(loadResult, activationResult) {
303
303
  }
304
304
  return [...new Set(warnings)].sort((left, right) => left.localeCompare(right));
305
305
  }
306
+ /**
307
+ * Ordered remediation rules evaluated while at least one warning is present. The
308
+ * order is load-bearing — it is the order remediation hints appear in doctor
309
+ * output — so new rules must be inserted at the intended position rather than
310
+ * appended.
311
+ */
312
+ const TRIAGE_REMEDIATION_RULES = [
313
+ {
314
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_manifest_")),
315
+ build: (ctx) => `Run ${lifecycleFlagCommand(ctx.options, "explore")} ${ctx.scopeFlag} to inspect discovered manifests and directories.`,
316
+ },
317
+ {
318
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_capability_unknown:")),
319
+ build: () => `Unknown extension capabilities detected. Allowed capabilities: ${KNOWN_EXTENSION_CAPABILITIES.join(", ")}. ` +
320
+ "Review extension_capability_unknown warning details for suggested replacements.",
321
+ },
322
+ {
323
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_capability_legacy_alias:")),
324
+ build: () => "Legacy extension capability aliases were auto-remapped to canonical capabilities. " +
325
+ "Update manifests to canonical names (migration/validation -> schema).",
326
+ },
327
+ {
328
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_capability_missing:")),
329
+ build: (ctx) => `Extension activation failed because code registered a surface missing from manifest capabilities. ` +
330
+ `Run ${lifecycleFlagCommand(ctx.options, "doctor")} ${ctx.scopeFlag} --detail deep --trace and add the reported missing_capability to manifest.json before publishing.`,
331
+ },
332
+ {
333
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_capability_unused:")),
334
+ build: (ctx) => "Extension manifests declare capabilities that are never registered against. " +
335
+ `Remove each reported unused capability from manifest.json to keep least privilege, or add the matching registration. Run ${lifecycleFlagCommand(ctx.options, "doctor")} ${ctx.scopeFlag} --detail deep --trace for per-extension registration counts.`,
336
+ },
337
+ {
338
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_command_definition_legacy_handler_alias:")),
339
+ build: () => "Extension command definitions using legacy handler were auto-remapped. " +
340
+ "Update command definitions to use run: (context) => ... for forward compatibility.",
341
+ },
342
+ {
343
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_output_service_override_global:") ||
344
+ warning.startsWith("extension_output_renderer_override_global:")),
345
+ build: () => "Global output service/renderer overrides are active. For output_format, return context.payload/null/undefined unless the extension owns the command. For renderers, return null for unrelated payloads so pm falls back to native rendering.",
346
+ },
347
+ {
348
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_schema_narrow_activation:")),
349
+ build: () => "A package registers custom item types/fields (a GLOBAL schema contribution) but also declares narrow activation.commands, so it never activates for built-in commands like pm create <type> and the custom type silently fails to register. Remove activation.commands from manifest.json so pm activates the package for every command, or — if the schema is intentionally command-scoped — knowingly ignore this advisory.",
350
+ },
351
+ {
352
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_load_failed_sdk_dependency_missing:")),
353
+ build: (ctx) => `Detected extension load failures caused by missing SDK dependency resolution. ` +
354
+ `Ensure extension package dependencies include "@unbrained/pm-cli" and reinstall dependencies before running ${lifecycleFlagCommand(ctx.options, "doctor")} ${ctx.scopeFlag}.`,
355
+ },
356
+ {
357
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_load_failed_module_mode_mismatch:")),
358
+ build: (ctx) => `Detected extension module-mode mismatches. For ESM-based extension entries/imports, set package.json "type": "module" ` +
359
+ `or use an explicit .mjs entry and rerun ${lifecycleFlagCommand(ctx.options, "doctor")} ${ctx.scopeFlag}.`,
360
+ },
361
+ {
362
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_pm_min_version_") || warning.startsWith("extension_pm_max_version_")),
363
+ build: (ctx) => "Extension pm version-bound warnings detected. Align each package manifest's pm_min_version/pm_max_version " +
364
+ `with the installed pm CLI version (see the warning's required/allowed=...:current=... details), or upgrade/downgrade the pm CLI to satisfy the declared bounds, then rerun ${lifecycleFlagCommand(ctx.options, "doctor")} ${ctx.scopeFlag}.`,
365
+ },
366
+ {
367
+ matches: (_warnings, ctx) => ctx.updateCheckFailedTotal > 0,
368
+ build: (ctx) => `Run ${lifecycleFlagCommand(ctx.options, "manage")} ${ctx.scopeFlag} after validating network and repository access.`,
369
+ },
370
+ {
371
+ matches: (warnings) => warnings.some((warning) => warning.startsWith("extension_manager_state_")),
372
+ build: (ctx) => `Review and repair ${ctx.scope} managed extension state file if schema/read warnings persist.`,
373
+ },
374
+ {
375
+ matches: (_warnings, ctx) => ctx.policyWarningCount > 0,
376
+ build: () => "Extension governance policy warnings detected. Review settings.extensions.policy mode and allow/block lists to confirm intended capabilities and registration surfaces.",
377
+ },
378
+ ];
379
+ /**
380
+ * Build the ordered remediation hints for a triage summary. Warning-driven rules
381
+ * (collision remediation first, then {@link TRIAGE_REMEDIATION_RULES}) only run
382
+ * when at least one warning is present; the update-health coverage and
383
+ * availability hints always run; and a "no immediate action" fallback is
384
+ * appended when nothing else applied.
385
+ */
386
+ function buildExtensionTriageRemediation(params) {
387
+ const { normalizedWarnings, options, scope, scopeFlag, updateCheckFailedTotal, policyWarningCount, updateHealthPartial, skippedUnmanagedTotal, skippedNonGithubTotal, updateAvailableTotal, } = params;
388
+ const remediation = [];
389
+ const ctx = { options, scope, scopeFlag, updateCheckFailedTotal, policyWarningCount };
390
+ if (normalizedWarnings.length > 0) {
391
+ const registrationCollisionRemediation = buildRegistrationCollisionRemediation(normalizedWarnings, {
392
+ deactivate: `${lifecycleFlagCommand(options, "deactivate")} <name> ${scopeFlag}`,
393
+ doctor: `${lifecycleFlagCommand(options, "doctor")} ${scopeFlag} --detail deep --trace`,
394
+ });
395
+ if (registrationCollisionRemediation) {
396
+ remediation.push(registrationCollisionRemediation);
397
+ }
398
+ for (const rule of TRIAGE_REMEDIATION_RULES) {
399
+ if (rule.matches(normalizedWarnings, ctx)) {
400
+ remediation.push(rule.build(ctx));
401
+ }
402
+ }
403
+ }
404
+ if (updateHealthPartial) {
405
+ 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>).`);
406
+ }
407
+ else if (skippedUnmanagedTotal > 0) {
408
+ remediation.push(`Loaded unmanaged extensions are currently treated as informational. Use ${lifecycleFlagCommand(options, "manage")} ${scopeFlag} --fix-managed-state to adopt them for update checks.`);
409
+ }
410
+ if (skippedNonGithubTotal > 0) {
411
+ remediation.push(`Non-GitHub managed extensions are skipped by update checks. Use doctor output for non-update diagnostics.`);
412
+ }
413
+ if (updateAvailableTotal > 0) {
414
+ remediation.push(`Update available managed extensions via ${lifecycleFlagCommand(options, "install")} ${scopeFlag} <source>.`);
415
+ }
416
+ if (remediation.length === 0) {
417
+ remediation.push(`No immediate action required. Re-run ${lifecycleFlagCommand(options, "manage")} ${scopeFlag} after extension changes.`);
418
+ }
419
+ return remediation;
420
+ }
306
421
  /**
307
422
  * Implements build extension triage summary for the public runtime surface of this module.
308
423
  */
@@ -343,80 +458,19 @@ export function buildExtensionTriageSummary(scope, warnings, extensions, options
343
458
  const warningCodes = [...new Set(effectiveWarnings.map((value) => warningCode(value)))].sort((left, right) => left.localeCompare(right));
344
459
  const policyWarnings = summarizePolicyWarnings(effectiveWarnings);
345
460
  const scopeFlag = scope === "global" ? "--global" : "--project";
346
- const remediation = [];
347
- if (normalizedWarnings.length > 0) {
348
- const registrationCollisionRemediation = buildRegistrationCollisionRemediation(normalizedWarnings, {
349
- deactivate: `${lifecycleFlagCommand(options, "deactivate")} <name> ${scopeFlag}`,
350
- doctor: `${lifecycleFlagCommand(options, "doctor")} ${scopeFlag} --detail deep --trace`,
351
- });
352
- if (registrationCollisionRemediation) {
353
- remediation.push(registrationCollisionRemediation);
354
- }
355
- if (normalizedWarnings.some((warning) => warning.startsWith("extension_manifest_"))) {
356
- remediation.push(`Run ${lifecycleFlagCommand(options, "explore")} ${scopeFlag} to inspect discovered manifests and directories.`);
357
- }
358
- if (normalizedWarnings.some((warning) => warning.startsWith("extension_capability_unknown:"))) {
359
- remediation.push(`Unknown extension capabilities detected. Allowed capabilities: ${KNOWN_EXTENSION_CAPABILITIES.join(", ")}. ` +
360
- "Review extension_capability_unknown warning details for suggested replacements.");
361
- }
362
- if (normalizedWarnings.some((warning) => warning.startsWith("extension_capability_legacy_alias:"))) {
363
- remediation.push("Legacy extension capability aliases were auto-remapped to canonical capabilities. " +
364
- "Update manifests to canonical names (migration/validation -> schema).");
365
- }
366
- if (normalizedWarnings.some((warning) => warning.startsWith("extension_capability_missing:"))) {
367
- remediation.push(`Extension activation failed because code registered a surface missing from manifest capabilities. ` +
368
- `Run ${lifecycleFlagCommand(options, "doctor")} ${scopeFlag} --detail deep --trace and add the reported missing_capability to manifest.json before publishing.`);
369
- }
370
- if (normalizedWarnings.some((warning) => warning.startsWith("extension_capability_unused:"))) {
371
- remediation.push("Extension manifests declare capabilities that are never registered against. " +
372
- `Remove each reported unused capability from manifest.json to keep least privilege, or add the matching registration. Run ${lifecycleFlagCommand(options, "doctor")} ${scopeFlag} --detail deep --trace for per-extension registration counts.`);
373
- }
374
- if (normalizedWarnings.some((warning) => warning.startsWith("extension_command_definition_legacy_handler_alias:"))) {
375
- remediation.push("Extension command definitions using legacy handler were auto-remapped. " +
376
- "Update command definitions to use run: (context) => ... for forward compatibility.");
377
- }
378
- if (normalizedWarnings.some((warning) => warning.startsWith("extension_output_service_override_global:") ||
379
- warning.startsWith("extension_output_renderer_override_global:"))) {
380
- remediation.push("Global output service/renderer overrides are active. For output_format, return context.payload/null/undefined unless the extension owns the command. For renderers, return null for unrelated payloads so pm falls back to native rendering.");
381
- }
382
- if (normalizedWarnings.some((warning) => warning.startsWith("extension_load_failed_sdk_dependency_missing:"))) {
383
- remediation.push(`Detected extension load failures caused by missing SDK dependency resolution. ` +
384
- `Ensure extension package dependencies include "@unbrained/pm-cli" and reinstall dependencies before running ${lifecycleFlagCommand(options, "doctor")} ${scopeFlag}.`);
385
- }
386
- if (normalizedWarnings.some((warning) => warning.startsWith("extension_load_failed_module_mode_mismatch:"))) {
387
- remediation.push(`Detected extension module-mode mismatches. For ESM-based extension entries/imports, set package.json "type": "module" ` +
388
- `or use an explicit .mjs entry and rerun ${lifecycleFlagCommand(options, "doctor")} ${scopeFlag}.`);
389
- }
390
- if (normalizedWarnings.some((warning) => warning.startsWith("extension_pm_min_version_") || warning.startsWith("extension_pm_max_version_"))) {
391
- remediation.push("Extension pm version-bound warnings detected. Align each package manifest's pm_min_version/pm_max_version " +
392
- `with the installed pm CLI version (see the warning's required/allowed=...:current=... details), or upgrade/downgrade the pm CLI to satisfy the declared bounds, then rerun ${lifecycleFlagCommand(options, "doctor")} ${scopeFlag}.`);
393
- }
394
- if (updateCheckFailedTotal > 0) {
395
- remediation.push(`Run ${lifecycleFlagCommand(options, "manage")} ${scopeFlag} after validating network and repository access.`);
396
- }
397
- if (normalizedWarnings.some((warning) => warning.startsWith("extension_manager_state_"))) {
398
- remediation.push(`Review and repair ${scope} managed extension state file if schema/read warnings persist.`);
399
- }
400
- if (policyWarnings.warning_count > 0) {
401
- remediation.push("Extension governance policy warnings detected. Review settings.extensions.policy mode and allow/block lists to confirm intended capabilities and registration surfaces.");
402
- }
403
- }
404
461
  const collisionPlan = buildRegistrationCollisionPlan(scope, normalizedWarnings, extensions, options);
405
- if (updateHealthPartial) {
406
- 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>).`);
407
- }
408
- else if (skippedUnmanagedTotal > 0) {
409
- remediation.push(`Loaded unmanaged extensions are currently treated as informational. Use ${lifecycleFlagCommand(options, "manage")} ${scopeFlag} --fix-managed-state to adopt them for update checks.`);
410
- }
411
- if (skippedNonGithubTotal > 0) {
412
- remediation.push(`Non-GitHub managed extensions are skipped by update checks. Use doctor output for non-update diagnostics.`);
413
- }
414
- if (updateAvailableTotal > 0) {
415
- remediation.push(`Update available managed extensions via ${lifecycleFlagCommand(options, "install")} ${scopeFlag} <source>.`);
416
- }
417
- if (remediation.length === 0) {
418
- remediation.push(`No immediate action required. Re-run ${lifecycleFlagCommand(options, "manage")} ${scopeFlag} after extension changes.`);
419
- }
462
+ const remediation = buildExtensionTriageRemediation({
463
+ normalizedWarnings,
464
+ options,
465
+ scope,
466
+ scopeFlag,
467
+ updateCheckFailedTotal,
468
+ policyWarningCount: policyWarnings.warning_count,
469
+ updateHealthPartial,
470
+ skippedUnmanagedTotal,
471
+ skippedNonGithubTotal,
472
+ updateAvailableTotal,
473
+ });
420
474
  return {
421
475
  status: effectiveWarnings.length === 0 ? "ok" : "warn",
422
476
  warning_count: effectiveWarnings.length,
@@ -556,4 +610,4 @@ export function buildDoctorConsistencySummary(scope, installedExtensions, loaded
556
610
  };
557
611
  }
558
612
  //# sourceMappingURL=doctor.js.map
559
- //# debugId=52b725dc-48e3-5436-8136-47e5314b07eb
613
+ //# debugId=391a9e4b-f4b7-5176-970b-6de9523822e7