@unbrained/pm-cli 2026.5.31 → 2026.6.5

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 (586) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/dist/cli/argv-utils.js +7 -3
  3. package/dist/cli/argv-utils.js.map +1 -1
  4. package/dist/cli/bootstrap-args.d.ts +1 -0
  5. package/dist/cli/bootstrap-args.js +23 -3
  6. package/dist/cli/bootstrap-args.js.map +1 -1
  7. package/dist/cli/commands/calendar.js +17 -3
  8. package/dist/cli/commands/calendar.js.map +1 -1
  9. package/dist/cli/commands/close-many.d.ts +63 -0
  10. package/dist/cli/commands/close-many.js +302 -0
  11. package/dist/cli/commands/close-many.js.map +1 -0
  12. package/dist/cli/commands/completion.d.ts +1 -0
  13. package/dist/cli/commands/completion.js +241 -27
  14. package/dist/cli/commands/completion.js.map +1 -1
  15. package/dist/cli/commands/config.d.ts +4 -4
  16. package/dist/cli/commands/config.js +115 -3
  17. package/dist/cli/commands/config.js.map +1 -1
  18. package/dist/cli/commands/contracts.js +191 -162
  19. package/dist/cli/commands/contracts.js.map +1 -1
  20. package/dist/cli/commands/create.d.ts +1 -0
  21. package/dist/cli/commands/create.js +77 -114
  22. package/dist/cli/commands/create.js.map +1 -1
  23. package/dist/cli/commands/extension/doctor.d.ts +12 -0
  24. package/dist/cli/commands/extension/doctor.js +97 -2
  25. package/dist/cli/commands/extension/doctor.js.map +1 -1
  26. package/dist/cli/commands/extension/scaffold.js +49 -48
  27. package/dist/cli/commands/extension/scaffold.js.map +1 -1
  28. package/dist/cli/commands/extension.js +51 -23
  29. package/dist/cli/commands/extension.js.map +1 -1
  30. package/dist/cli/commands/get.js +7 -7
  31. package/dist/cli/commands/get.js.map +1 -1
  32. package/dist/cli/commands/health.js +38 -3
  33. package/dist/cli/commands/health.js.map +1 -1
  34. package/dist/cli/commands/index.d.ts +2 -1
  35. package/dist/cli/commands/index.js +4 -3
  36. package/dist/cli/commands/index.js.map +1 -1
  37. package/dist/cli/commands/init.d.ts +10 -0
  38. package/dist/cli/commands/init.js +107 -4
  39. package/dist/cli/commands/init.js.map +1 -1
  40. package/dist/cli/commands/list.d.ts +5 -0
  41. package/dist/cli/commands/list.js +58 -26
  42. package/dist/cli/commands/list.js.map +1 -1
  43. package/dist/cli/commands/reindex.js +163 -47
  44. package/dist/cli/commands/reindex.js.map +1 -1
  45. package/dist/cli/commands/repeatable-metadata-parsers.d.ts +15 -0
  46. package/dist/cli/commands/repeatable-metadata-parsers.js +120 -0
  47. package/dist/cli/commands/repeatable-metadata-parsers.js.map +1 -0
  48. package/dist/cli/commands/restore.js +25 -4
  49. package/dist/cli/commands/restore.js.map +1 -1
  50. package/dist/cli/commands/schema.d.ts +122 -1
  51. package/dist/cli/commands/schema.js +536 -6
  52. package/dist/cli/commands/schema.js.map +1 -1
  53. package/dist/cli/commands/search.d.ts +1 -0
  54. package/dist/cli/commands/search.js +18 -4
  55. package/dist/cli/commands/search.js.map +1 -1
  56. package/dist/cli/commands/test.js +4 -3
  57. package/dist/cli/commands/test.js.map +1 -1
  58. package/dist/cli/commands/update-many.js +69 -140
  59. package/dist/cli/commands/update-many.js.map +1 -1
  60. package/dist/cli/commands/update.d.ts +2 -0
  61. package/dist/cli/commands/update.js +138 -119
  62. package/dist/cli/commands/update.js.map +1 -1
  63. package/dist/cli/commands/validate.d.ts +1 -0
  64. package/dist/cli/commands/validate.js +63 -33
  65. package/dist/cli/commands/validate.js.map +1 -1
  66. package/dist/cli/error-guidance.js +26 -3
  67. package/dist/cli/error-guidance.js.map +1 -1
  68. package/dist/cli/help-content.js +82 -3
  69. package/dist/cli/help-content.js.map +1 -1
  70. package/dist/cli/main.js +377 -23
  71. package/dist/cli/main.js.map +1 -1
  72. package/dist/cli/register-list-query.js +9 -3
  73. package/dist/cli/register-list-query.js.map +1 -1
  74. package/dist/cli/register-mutation.js +200 -28
  75. package/dist/cli/register-mutation.js.map +1 -1
  76. package/dist/cli/register-operations.js +4 -2
  77. package/dist/cli/register-operations.js.map +1 -1
  78. package/dist/cli/register-setup.js +4 -2
  79. package/dist/cli/register-setup.js.map +1 -1
  80. package/dist/cli/registration-helpers.js +31 -4
  81. package/dist/cli/registration-helpers.js.map +1 -1
  82. package/dist/cli-bundle/chunks/activity-3RWRRNOW.js +20 -0
  83. package/dist/cli-bundle/chunks/activity-3RWRRNOW.js.map +1 -0
  84. package/dist/cli-bundle/chunks/activity-P5BUMWP3.js +16 -0
  85. package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js +206 -0
  86. package/dist/cli-bundle/chunks/aggregate-J35K7WZB.js.map +1 -0
  87. package/dist/cli-bundle/chunks/{aggregate-ADUOSFRO.js → aggregate-OOAGKWRG.js} +11 -11
  88. package/dist/cli-bundle/chunks/{append-JD2DETU7.js → append-5JE3YGXU.js} +8 -9
  89. package/dist/cli-bundle/chunks/{append-JD2DETU7.js.map → append-5JE3YGXU.js.map} +1 -1
  90. package/dist/cli-bundle/chunks/append-PNN6UIBZ.js +69 -0
  91. package/dist/cli-bundle/chunks/append-PNN6UIBZ.js.map +1 -0
  92. package/dist/cli-bundle/chunks/chunk-26KTVXJW.js +218 -0
  93. package/dist/cli-bundle/chunks/chunk-26KTVXJW.js.map +1 -0
  94. package/dist/cli-bundle/chunks/{chunk-JULRTHJQ.js → chunk-3OH4DAEB.js} +119 -6
  95. package/dist/cli-bundle/chunks/chunk-3OH4DAEB.js.map +7 -0
  96. package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js +5553 -0
  97. package/dist/cli-bundle/chunks/chunk-4LTBNUYT.js.map +1 -0
  98. package/dist/cli-bundle/chunks/{chunk-WDPXDQFG.js → chunk-4PJQSECJ.js} +6 -4
  99. package/dist/cli-bundle/chunks/chunk-4PJQSECJ.js.map +7 -0
  100. package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js +1832 -0
  101. package/dist/cli-bundle/chunks/chunk-4QCR4QW3.js.map +1 -0
  102. package/dist/cli-bundle/chunks/{chunk-6HT2F4TK.js → chunk-5IRA6IYD.js} +175 -54
  103. package/dist/cli-bundle/chunks/chunk-5IRA6IYD.js.map +7 -0
  104. package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js +412 -0
  105. package/dist/cli-bundle/chunks/chunk-5KB4X7YY.js.map +1 -0
  106. package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js +182 -0
  107. package/dist/cli-bundle/chunks/chunk-5PAOPUZX.js.map +1 -0
  108. package/dist/cli-bundle/chunks/chunk-7K24QB23.js +698 -0
  109. package/dist/cli-bundle/chunks/chunk-7K24QB23.js.map +1 -0
  110. package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js +380 -0
  111. package/dist/cli-bundle/chunks/chunk-A6PEXMYN.js.map +1 -0
  112. package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js +230 -0
  113. package/dist/cli-bundle/chunks/chunk-ASQM3IF5.js.map +1 -0
  114. package/dist/cli-bundle/chunks/{chunk-G57E5D7T.js → chunk-ATBVS6WW.js} +5 -5
  115. package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js +332 -0
  116. package/dist/cli-bundle/chunks/chunk-AXXKLVTW.js.map +1 -0
  117. package/dist/cli-bundle/chunks/{chunk-PXUAZUUY.js → chunk-B3N4TKNL.js} +12 -11
  118. package/dist/cli-bundle/chunks/chunk-B3N4TKNL.js.map +7 -0
  119. package/dist/cli-bundle/chunks/{chunk-KBQY3YG5.js → chunk-BNL6S7QH.js} +3 -3
  120. package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js +154 -0
  121. package/dist/cli-bundle/chunks/chunk-CCUFLH4J.js.map +1 -0
  122. package/dist/cli-bundle/chunks/{chunk-NGN7UV5K.js → chunk-CJDQB2ED.js} +2 -2
  123. package/dist/cli-bundle/chunks/chunk-CWT53EYT.js +1340 -0
  124. package/dist/cli-bundle/chunks/chunk-CWT53EYT.js.map +1 -0
  125. package/dist/cli-bundle/chunks/{chunk-D7AOMPRH.js → chunk-D3WUNETC.js} +5 -5
  126. package/dist/cli-bundle/chunks/{chunk-3M73P3G6.js → chunk-D5X7N6FI.js} +210 -132
  127. package/dist/cli-bundle/chunks/chunk-D5X7N6FI.js.map +7 -0
  128. package/dist/cli-bundle/chunks/{chunk-6YCV7WSL.js → chunk-DFIZGAI5.js} +10 -12
  129. package/dist/cli-bundle/chunks/{chunk-6YCV7WSL.js.map → chunk-DFIZGAI5.js.map} +1 -1
  130. package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js +1704 -0
  131. package/dist/cli-bundle/chunks/chunk-DFUSXJDE.js.map +1 -0
  132. package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js +2988 -0
  133. package/dist/cli-bundle/chunks/chunk-EHXPIKKP.js.map +1 -0
  134. package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js +128 -0
  135. package/dist/cli-bundle/chunks/chunk-FVXM3GKS.js.map +1 -0
  136. package/dist/cli-bundle/chunks/chunk-G5BACLYH.js +454 -0
  137. package/dist/cli-bundle/chunks/chunk-G5BACLYH.js.map +1 -0
  138. package/dist/cli-bundle/chunks/{chunk-U7FMKRXH.js → chunk-GCAVRLGE.js} +37 -16
  139. package/dist/cli-bundle/chunks/chunk-GCAVRLGE.js.map +7 -0
  140. package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js +57 -0
  141. package/dist/cli-bundle/chunks/chunk-GFWHHMVV.js.map +1 -0
  142. package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js +3860 -0
  143. package/dist/cli-bundle/chunks/chunk-GNHVV4SY.js.map +1 -0
  144. package/dist/cli-bundle/chunks/chunk-GPGAYASV.js +346 -0
  145. package/dist/cli-bundle/chunks/chunk-GPGAYASV.js.map +1 -0
  146. package/dist/cli-bundle/chunks/{chunk-MD7K4JYF.js → chunk-HPH6X4ZZ.js} +26 -15
  147. package/dist/cli-bundle/chunks/chunk-HPH6X4ZZ.js.map +7 -0
  148. package/dist/cli-bundle/chunks/{chunk-5HSEP75M.js → chunk-HZOS2UG5.js} +18 -6
  149. package/dist/cli-bundle/chunks/chunk-HZOS2UG5.js.map +7 -0
  150. package/dist/cli-bundle/chunks/chunk-IUV734HF.js +17 -0
  151. package/dist/cli-bundle/chunks/chunk-IUV734HF.js.map +1 -0
  152. package/dist/cli-bundle/chunks/chunk-J27KIHTG.js +15 -0
  153. package/dist/cli-bundle/chunks/chunk-J27KIHTG.js.map +1 -0
  154. package/dist/cli-bundle/chunks/{chunk-L2FXEKDB.js → chunk-JB4RGL4V.js} +7 -7
  155. package/dist/cli-bundle/chunks/chunk-JQI2HE55.js +130 -0
  156. package/dist/cli-bundle/chunks/chunk-JQI2HE55.js.map +1 -0
  157. package/dist/cli-bundle/chunks/{chunk-SEXQN4KL.js → chunk-K47WAYQV.js} +3 -3
  158. package/dist/cli-bundle/chunks/{chunk-CEFIVZPG.js → chunk-KA24HME7.js} +2 -2
  159. package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js +1325 -0
  160. package/dist/cli-bundle/chunks/chunk-KBG47ZOY.js.map +1 -0
  161. package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js +242 -0
  162. package/dist/cli-bundle/chunks/chunk-KCMIYKTA.js.map +1 -0
  163. package/dist/cli-bundle/chunks/{chunk-7Y53ZJIQ.js → chunk-KK6YPGH3.js} +22 -3
  164. package/dist/cli-bundle/chunks/chunk-KK6YPGH3.js.map +7 -0
  165. package/dist/cli-bundle/chunks/{chunk-A7E7PUVX.js → chunk-LDJK7SHN.js} +7 -7
  166. package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js +24 -0
  167. package/dist/cli-bundle/chunks/chunk-LXYVKYMQ.js.map +1 -0
  168. package/dist/cli-bundle/chunks/chunk-MISYRLEP.js +80 -0
  169. package/dist/cli-bundle/chunks/chunk-MISYRLEP.js.map +1 -0
  170. package/dist/cli-bundle/chunks/{chunk-FQE6XZDB.js → chunk-N5YF3VFN.js} +54 -32
  171. package/dist/cli-bundle/chunks/chunk-N5YF3VFN.js.map +7 -0
  172. package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js +173 -0
  173. package/dist/cli-bundle/chunks/chunk-NQP3ECKF.js.map +1 -0
  174. package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js +338 -0
  175. package/dist/cli-bundle/chunks/chunk-O5IBJE6S.js.map +1 -0
  176. package/dist/cli-bundle/chunks/{chunk-OGZEG5TT.js → chunk-OIQIXTNB.js} +164 -53
  177. package/dist/cli-bundle/chunks/chunk-OIQIXTNB.js.map +7 -0
  178. package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js +751 -0
  179. package/dist/cli-bundle/chunks/chunk-ORTLYVA4.js.map +1 -0
  180. package/dist/cli-bundle/chunks/{chunk-JTWRXG4B.js → chunk-OUF3ARDX.js} +251 -251
  181. package/dist/cli-bundle/chunks/chunk-OUF3ARDX.js.map +7 -0
  182. package/dist/cli-bundle/chunks/{chunk-PVNQLCIS.js → chunk-RANZIID5.js} +2 -2
  183. package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js +140 -0
  184. package/dist/cli-bundle/chunks/chunk-RQAWLSUU.js.map +7 -0
  185. package/dist/cli-bundle/chunks/{chunk-JFWUHHS2.js → chunk-S3CV7JGJ.js} +4 -4
  186. package/dist/cli-bundle/chunks/{chunk-LSXGH6NE.js → chunk-SRVKTWPR.js} +748 -196
  187. package/dist/cli-bundle/chunks/chunk-SRVKTWPR.js.map +7 -0
  188. package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js +76 -0
  189. package/dist/cli-bundle/chunks/chunk-SSFMJCPF.js.map +1 -0
  190. package/dist/cli-bundle/chunks/chunk-SZQCER6S.js +631 -0
  191. package/dist/cli-bundle/chunks/chunk-SZQCER6S.js.map +1 -0
  192. package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js +540 -0
  193. package/dist/cli-bundle/chunks/chunk-T2ORWB6D.js.map +1 -0
  194. package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js +422 -0
  195. package/dist/cli-bundle/chunks/chunk-TBQVUNVH.js.map +7 -0
  196. package/dist/cli-bundle/chunks/{chunk-P53TN6IA.js → chunk-TK633IVD.js} +35 -8
  197. package/dist/cli-bundle/chunks/chunk-TK633IVD.js.map +7 -0
  198. package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js +131 -0
  199. package/dist/cli-bundle/chunks/chunk-TQ3ZK6VD.js.map +7 -0
  200. package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js +119 -0
  201. package/dist/cli-bundle/chunks/chunk-UFCG3SWR.js.map +1 -0
  202. package/dist/cli-bundle/chunks/chunk-UOVLWB47.js +1664 -0
  203. package/dist/cli-bundle/chunks/chunk-UOVLWB47.js.map +1 -0
  204. package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js +186 -0
  205. package/dist/cli-bundle/chunks/chunk-V3JQ4IPL.js.map +1 -0
  206. package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js +182 -0
  207. package/dist/cli-bundle/chunks/chunk-VGO2T3TY.js.map +1 -0
  208. package/dist/cli-bundle/chunks/{chunk-LRBOHPUE.js → chunk-WIKR7KFL.js} +8 -8
  209. package/dist/cli-bundle/chunks/{chunk-BUPWJ3IJ.js → chunk-XG7RJYHV.js} +484 -49
  210. package/dist/cli-bundle/chunks/chunk-XG7RJYHV.js.map +7 -0
  211. package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js +53 -0
  212. package/dist/cli-bundle/chunks/chunk-XSLQSXAH.js.map +1 -0
  213. package/dist/cli-bundle/chunks/{chunk-AKOOMO3T.js → chunk-XX5LRINW.js} +2 -2
  214. package/dist/cli-bundle/chunks/{chunk-WJ2NAC37.js → chunk-Y2AKE2HS.js} +3 -3
  215. package/dist/cli-bundle/chunks/{chunk-GN7IJPCD.js → chunk-ZQ4F6EC4.js} +301 -24
  216. package/dist/cli-bundle/chunks/chunk-ZQ4F6EC4.js.map +7 -0
  217. package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js +1809 -0
  218. package/dist/cli-bundle/chunks/chunk-ZRVSMOMR.js.map +1 -0
  219. package/dist/cli-bundle/chunks/{claim-EE4TKKCV.js → claim-AZLP7YFO.js} +10 -11
  220. package/dist/cli-bundle/chunks/{claim-EE4TKKCV.js.map → claim-AZLP7YFO.js.map} +1 -1
  221. package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js +129 -0
  222. package/dist/cli-bundle/chunks/claim-ZFA7HKU4.js.map +1 -0
  223. package/dist/cli-bundle/chunks/close-65DFYAVS.js +17 -0
  224. package/dist/cli-bundle/chunks/close-65DFYAVS.js.map +1 -0
  225. package/dist/cli-bundle/chunks/close-RMHQ3KWH.js +13 -0
  226. package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js +311 -0
  227. package/dist/cli-bundle/chunks/close-many-AKPZNSGI.js.map +1 -0
  228. package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js +314 -0
  229. package/dist/cli-bundle/chunks/close-many-UKZSQGM7.js.map +7 -0
  230. package/dist/cli-bundle/chunks/{comments-AAKJQ6LW.js → comments-AGBNSJJH.js} +10 -11
  231. package/dist/cli-bundle/chunks/{comments-AAKJQ6LW.js.map → comments-AGBNSJJH.js.map} +1 -1
  232. package/dist/cli-bundle/chunks/comments-CJWXQI7X.js +100 -0
  233. package/dist/cli-bundle/chunks/comments-CJWXQI7X.js.map +1 -0
  234. package/dist/cli-bundle/chunks/{config-V3FZOKLI.js → config-5ON3ADRH.js} +121 -10
  235. package/dist/cli-bundle/chunks/config-5ON3ADRH.js.map +7 -0
  236. package/dist/cli-bundle/chunks/config-DDPYIA6J.js +1671 -0
  237. package/dist/cli-bundle/chunks/config-DDPYIA6J.js.map +1 -0
  238. package/dist/cli-bundle/chunks/{context-RZ5QPNJB.js → context-E6U3DWVM.js} +32 -19
  239. package/dist/cli-bundle/chunks/{context-RZ5QPNJB.js.map → context-E6U3DWVM.js.map} +2 -2
  240. package/dist/cli-bundle/chunks/context-ZOJEN5VT.js +1461 -0
  241. package/dist/cli-bundle/chunks/context-ZOJEN5VT.js.map +1 -0
  242. package/dist/cli-bundle/chunks/{contracts-YLMH33VU.js → contracts-CXSFM45B.js} +194 -162
  243. package/dist/cli-bundle/chunks/contracts-CXSFM45B.js.map +7 -0
  244. package/dist/cli-bundle/chunks/contracts-LCSX5R53.js +1274 -0
  245. package/dist/cli-bundle/chunks/contracts-LCSX5R53.js.map +1 -0
  246. package/dist/cli-bundle/chunks/create-ATONSAZW.js +27 -0
  247. package/dist/cli-bundle/chunks/create-WYFKN2U4.js +31 -0
  248. package/dist/cli-bundle/chunks/create-WYFKN2U4.js.map +1 -0
  249. package/dist/cli-bundle/chunks/{delete-RHCTEORS.js → delete-RONNH4F4.js} +7 -8
  250. package/dist/cli-bundle/chunks/{delete-RHCTEORS.js.map → delete-RONNH4F4.js.map} +1 -1
  251. package/dist/cli-bundle/chunks/delete-ZXWC56WO.js +55 -0
  252. package/dist/cli-bundle/chunks/delete-ZXWC56WO.js.map +1 -0
  253. package/dist/cli-bundle/chunks/deps-EHXIFOZR.js +225 -0
  254. package/dist/cli-bundle/chunks/deps-EHXIFOZR.js.map +1 -0
  255. package/dist/cli-bundle/chunks/{deps-MZYCMLAO.js → deps-WII3O4HB.js} +7 -8
  256. package/dist/cli-bundle/chunks/{deps-MZYCMLAO.js.map → deps-WII3O4HB.js.map} +1 -1
  257. package/dist/cli-bundle/chunks/{docs-FXXUCZYU.js → docs-JMVCFNHH.js} +9 -10
  258. package/dist/cli-bundle/chunks/{docs-FXXUCZYU.js.map → docs-JMVCFNHH.js.map} +1 -1
  259. package/dist/cli-bundle/chunks/docs-PDREIMLS.js +31 -0
  260. package/dist/cli-bundle/chunks/docs-PDREIMLS.js.map +1 -0
  261. package/dist/cli-bundle/chunks/extension-B4ROVWJD.js +28 -0
  262. package/dist/cli-bundle/chunks/extension-B4ROVWJD.js.map +1 -0
  263. package/dist/cli-bundle/chunks/{extension-B4WL7BQU.js → extension-G6UXSM5S.js} +4 -5
  264. package/dist/cli-bundle/chunks/files-2PN7UM2D.js +282 -0
  265. package/dist/cli-bundle/chunks/files-2PN7UM2D.js.map +1 -0
  266. package/dist/cli-bundle/chunks/{files-WVOX67PE.js → files-MXYS5W4M.js} +9 -10
  267. package/dist/cli-bundle/chunks/{files-WVOX67PE.js.map → files-MXYS5W4M.js.map} +1 -1
  268. package/dist/cli-bundle/chunks/gc-GT552UJH.js +178 -0
  269. package/dist/cli-bundle/chunks/gc-GT552UJH.js.map +1 -0
  270. package/dist/cli-bundle/chunks/{gc-JWNF66EC.js → gc-QNBRJG6H.js} +3 -3
  271. package/dist/cli-bundle/chunks/{get-LTK3HOCQ.js → get-CINFEUIY.js} +16 -17
  272. package/dist/cli-bundle/chunks/get-CINFEUIY.js.map +7 -0
  273. package/dist/cli-bundle/chunks/get-WXMLRG7M.js +194 -0
  274. package/dist/cli-bundle/chunks/get-WXMLRG7M.js.map +1 -0
  275. package/dist/cli-bundle/chunks/health-5VPOJQ53.js +1258 -0
  276. package/dist/cli-bundle/chunks/health-5VPOJQ53.js.map +1 -0
  277. package/dist/cli-bundle/chunks/{health-TCWL55KM.js → health-IT5DBPRJ.js} +43 -15
  278. package/dist/cli-bundle/chunks/health-IT5DBPRJ.js.map +7 -0
  279. package/dist/cli-bundle/chunks/history-6FC4H6HI.js +20 -0
  280. package/dist/cli-bundle/chunks/history-FLZIP7PM.js +24 -0
  281. package/dist/cli-bundle/chunks/history-FLZIP7PM.js.map +1 -0
  282. package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js +23 -0
  283. package/dist/cli-bundle/chunks/history-redact-SSZBAD76.js.map +1 -0
  284. package/dist/cli-bundle/chunks/history-redact-XKYEZDBL.js +19 -0
  285. package/dist/cli-bundle/chunks/{history-repair-ZWSTDRH2.js → history-repair-KC5ZOJRZ.js} +12 -14
  286. package/dist/cli-bundle/chunks/{history-repair-ZWSTDRH2.js.map → history-repair-KC5ZOJRZ.js.map} +1 -1
  287. package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js +193 -0
  288. package/dist/cli-bundle/chunks/history-repair-X7CO5JJZ.js.map +1 -0
  289. package/dist/cli-bundle/chunks/init-6MRFVOLH.js +20 -0
  290. package/dist/cli-bundle/chunks/init-6MRFVOLH.js.map +1 -0
  291. package/dist/cli-bundle/chunks/init-KHX3FEEM.js +16 -0
  292. package/dist/cli-bundle/chunks/{learnings-NXTWE3FR.js → learnings-A3CLB5CO.js} +10 -11
  293. package/dist/cli-bundle/chunks/{learnings-NXTWE3FR.js.map → learnings-A3CLB5CO.js.map} +1 -1
  294. package/dist/cli-bundle/chunks/learnings-DCX55BNX.js +44 -0
  295. package/dist/cli-bundle/chunks/learnings-DCX55BNX.js.map +1 -0
  296. package/dist/cli-bundle/chunks/list-53LZ2AEO.js +20 -0
  297. package/dist/cli-bundle/chunks/list-DBRECOG4.js +24 -0
  298. package/dist/cli-bundle/chunks/list-DBRECOG4.js.map +1 -0
  299. package/dist/cli-bundle/chunks/{notes-DFS5ZGOO.js → notes-42LIC3UE.js} +10 -11
  300. package/dist/cli-bundle/chunks/{notes-DFS5ZGOO.js.map → notes-42LIC3UE.js.map} +1 -1
  301. package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js +44 -0
  302. package/dist/cli-bundle/chunks/notes-P5O3VMQ3.js.map +1 -0
  303. package/dist/cli-bundle/chunks/{plan-67AB2PLM.js → plan-HDQXEUKD.js} +13 -14
  304. package/dist/cli-bundle/chunks/{plan-67AB2PLM.js.map → plan-HDQXEUKD.js.map} +1 -1
  305. package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js +1171 -0
  306. package/dist/cli-bundle/chunks/plan-IGTE3WOJ.js.map +1 -0
  307. package/dist/cli-bundle/chunks/{register-list-query-UP3VRUFS.js → register-list-query-AG3XKXWL.js} +22 -24
  308. package/dist/cli-bundle/chunks/register-list-query-AG3XKXWL.js.map +7 -0
  309. package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js +227 -0
  310. package/dist/cli-bundle/chunks/register-list-query-EMNSIUO4.js.map +1 -0
  311. package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js +813 -0
  312. package/dist/cli-bundle/chunks/register-mutation-M3YS6XDO.js.map +1 -0
  313. package/dist/cli-bundle/chunks/{register-mutation-YWSBF545.js → register-mutation-RSMT6DPK.js} +154 -43
  314. package/dist/cli-bundle/chunks/register-mutation-RSMT6DPK.js.map +7 -0
  315. package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js +370 -0
  316. package/dist/cli-bundle/chunks/register-operations-KYUOOOOD.js.map +1 -0
  317. package/dist/cli-bundle/chunks/{register-operations-3BDTGSDH.js → register-operations-Q54JQZUN.js} +33 -34
  318. package/dist/cli-bundle/chunks/register-operations-Q54JQZUN.js.map +7 -0
  319. package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js +242 -0
  320. package/dist/cli-bundle/chunks/register-setup-DI6P7X75.js.map +1 -0
  321. package/dist/cli-bundle/chunks/{register-setup-V56GDRUS.js → register-setup-YJKIQRKA.js} +18 -19
  322. package/dist/cli-bundle/chunks/{register-setup-V56GDRUS.js.map → register-setup-YJKIQRKA.js.map} +2 -2
  323. package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js +21 -0
  324. package/dist/cli-bundle/chunks/restore-2XVTBLKQ.js.map +1 -0
  325. package/dist/cli-bundle/chunks/restore-JL5QIH7H.js +17 -0
  326. package/dist/cli-bundle/chunks/schema-LVXZWFGY.js +770 -0
  327. package/dist/cli-bundle/chunks/schema-LVXZWFGY.js.map +1 -0
  328. package/dist/cli-bundle/chunks/schema-V6BX65Q2.js +780 -0
  329. package/dist/cli-bundle/chunks/schema-V6BX65Q2.js.map +7 -0
  330. package/dist/cli-bundle/chunks/{search-HENBL456.js → search-5A3BMFA7.js} +25 -16
  331. package/dist/cli-bundle/chunks/search-5A3BMFA7.js.map +7 -0
  332. package/dist/cli-bundle/chunks/search-C7NPB7G7.js +1127 -0
  333. package/dist/cli-bundle/chunks/search-C7NPB7G7.js.map +1 -0
  334. package/dist/cli-bundle/chunks/stats-FNLYVXTB.js +120 -0
  335. package/dist/cli-bundle/chunks/stats-FNLYVXTB.js.map +1 -0
  336. package/dist/cli-bundle/chunks/{stats-N6H3YP2F.js → stats-Y2CBTZSL.js} +7 -8
  337. package/dist/cli-bundle/chunks/{stats-N6H3YP2F.js.map → stats-Y2CBTZSL.js.map} +1 -1
  338. package/dist/cli-bundle/chunks/test-OFYONO3C.js +35 -0
  339. package/dist/cli-bundle/chunks/test-OFYONO3C.js.map +1 -0
  340. package/dist/cli-bundle/chunks/test-RJ4ZF35X.js +31 -0
  341. package/dist/cli-bundle/chunks/{test-all-G2AZOHXI.js → test-all-EEMKNTGU.js} +13 -14
  342. package/dist/cli-bundle/chunks/{test-all-G2AZOHXI.js.map → test-all-EEMKNTGU.js.map} +1 -1
  343. package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js +328 -0
  344. package/dist/cli-bundle/chunks/test-all-OJE6CIO7.js.map +1 -0
  345. package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js +929 -0
  346. package/dist/cli-bundle/chunks/test-runs-IPOPFOAF.js.map +1 -0
  347. package/dist/cli-bundle/chunks/{test-runs-GX5HTPSF.js → test-runs-L2M7WKH7.js} +5 -5
  348. package/dist/cli-bundle/chunks/update-6YEHPVXH.js +25 -0
  349. package/dist/cli-bundle/chunks/update-6YEHPVXH.js.map +1 -0
  350. package/dist/cli-bundle/chunks/update-PYLVHMRD.js +21 -0
  351. package/dist/cli-bundle/chunks/{update-many-46HRSP2Q.js → update-many-322CCH2L.js} +78 -146
  352. package/dist/cli-bundle/chunks/update-many-322CCH2L.js.map +7 -0
  353. package/dist/cli-bundle/chunks/update-many-DYWGW57M.js +605 -0
  354. package/dist/cli-bundle/chunks/update-many-DYWGW57M.js.map +1 -0
  355. package/dist/cli-bundle/chunks/{upgrade-H5HHM5UV.js → upgrade-2U727SAM.js} +5 -7
  356. package/dist/cli-bundle/chunks/{upgrade-H5HHM5UV.js.map → upgrade-2U727SAM.js.map} +1 -1
  357. package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js +266 -0
  358. package/dist/cli-bundle/chunks/upgrade-3W3RVSNM.js.map +1 -0
  359. package/dist/cli-bundle/chunks/validate-GZ24NYHO.js +1120 -0
  360. package/dist/cli-bundle/chunks/validate-GZ24NYHO.js.map +1 -0
  361. package/dist/cli-bundle/chunks/{validate-TMCVKIGZ.js → validate-ZFVWPEEN.js} +61 -48
  362. package/dist/cli-bundle/chunks/validate-ZFVWPEEN.js.map +7 -0
  363. package/dist/cli-bundle/main.js +490 -52
  364. package/dist/cli-bundle/main.js.map +2 -2
  365. package/dist/core/checkpoint/mutation-checkpoint.d.ts +44 -0
  366. package/dist/core/checkpoint/mutation-checkpoint.js +119 -0
  367. package/dist/core/checkpoint/mutation-checkpoint.js.map +1 -0
  368. package/dist/core/config/positional-value.js +4 -2
  369. package/dist/core/config/positional-value.js.map +1 -1
  370. package/dist/core/diagnostics/remediation.d.ts +73 -0
  371. package/dist/core/diagnostics/remediation.js +328 -0
  372. package/dist/core/diagnostics/remediation.js.map +1 -0
  373. package/dist/core/extensions/extension-hook-runtime.js +9 -2
  374. package/dist/core/extensions/extension-hook-runtime.js.map +1 -1
  375. package/dist/core/extensions/extension-types.d.ts +60 -4
  376. package/dist/core/extensions/extension-types.js +2 -2
  377. package/dist/core/extensions/extension-types.js.map +1 -1
  378. package/dist/core/extensions/index.d.ts +5 -1
  379. package/dist/core/extensions/index.js +61 -2
  380. package/dist/core/extensions/index.js.map +1 -1
  381. package/dist/core/extensions/item-fields.d.ts +5 -1
  382. package/dist/core/extensions/item-fields.js +126 -4
  383. package/dist/core/extensions/item-fields.js.map +1 -1
  384. package/dist/core/extensions/loader.js +283 -8
  385. package/dist/core/extensions/loader.js.map +1 -1
  386. package/dist/core/item/item-format.d.ts +3 -2
  387. package/dist/core/item/item-format.js +15 -10
  388. package/dist/core/item/item-format.js.map +1 -1
  389. package/dist/core/item/status-filter.d.ts +29 -0
  390. package/dist/core/item/status-filter.js +97 -0
  391. package/dist/core/item/status-filter.js.map +1 -0
  392. package/dist/core/item/type-registry.js +4 -2
  393. package/dist/core/item/type-registry.js.map +1 -1
  394. package/dist/core/output/output.js +17 -5
  395. package/dist/core/output/output.js.map +1 -1
  396. package/dist/core/schema/item-types-file.d.ts +15 -0
  397. package/dist/core/schema/item-types-file.js +27 -2
  398. package/dist/core/schema/item-types-file.js.map +1 -1
  399. package/dist/core/schema/runtime-field-filters.js +4 -3
  400. package/dist/core/schema/runtime-field-filters.js.map +1 -1
  401. package/dist/core/schema/runtime-field-values.d.ts +1 -1
  402. package/dist/core/schema/runtime-field-values.js +10 -4
  403. package/dist/core/schema/runtime-field-values.js.map +1 -1
  404. package/dist/core/schema/runtime-schema.js +75 -2
  405. package/dist/core/schema/runtime-schema.js.map +1 -1
  406. package/dist/core/schema/status-defs-file.d.ts +113 -0
  407. package/dist/core/schema/status-defs-file.js +260 -0
  408. package/dist/core/schema/status-defs-file.js.map +1 -0
  409. package/dist/core/schema/type-workflows.d.ts +64 -0
  410. package/dist/core/schema/type-workflows.js +98 -0
  411. package/dist/core/schema/type-workflows.js.map +1 -0
  412. package/dist/core/search/cache.d.ts +3 -1
  413. package/dist/core/search/cache.js +104 -28
  414. package/dist/core/search/cache.js.map +1 -1
  415. package/dist/core/search/http-client.d.ts +2 -2
  416. package/dist/core/search/http-client.js +2 -2
  417. package/dist/core/search/http-client.js.map +1 -1
  418. package/dist/core/search/vector-stores.d.ts +1 -0
  419. package/dist/core/search/vector-stores.js +64 -14
  420. package/dist/core/search/vector-stores.js.map +1 -1
  421. package/dist/core/search/vectorization-metadata.d.ts +13 -0
  422. package/dist/core/search/vectorization-metadata.js +65 -0
  423. package/dist/core/search/vectorization-metadata.js.map +1 -0
  424. package/dist/core/shared/serialization.d.ts +1 -0
  425. package/dist/core/shared/serialization.js +86 -2
  426. package/dist/core/shared/serialization.js.map +1 -1
  427. package/dist/core/store/front-matter-cache.js +14 -5
  428. package/dist/core/store/front-matter-cache.js.map +1 -1
  429. package/dist/core/store/item-store.d.ts +2 -0
  430. package/dist/core/store/item-store.js +61 -6
  431. package/dist/core/store/item-store.js.map +1 -1
  432. package/dist/core/store/settings-validator.js +18 -2
  433. package/dist/core/store/settings-validator.js.map +1 -1
  434. package/dist/core/store/settings.js +40 -5
  435. package/dist/core/store/settings.js.map +1 -1
  436. package/dist/core/telemetry/consent.js +3 -3
  437. package/dist/core/telemetry/consent.js.map +1 -1
  438. package/dist/core/telemetry/observability.js +4 -3
  439. package/dist/core/telemetry/observability.js.map +1 -1
  440. package/dist/mcp/server.js +221 -12
  441. package/dist/mcp/server.js.map +1 -1
  442. package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -2
  443. package/dist/sdk/cli-contracts/commander-mutation-options.js.map +1 -1
  444. package/dist/sdk/cli-contracts/commander-types.js +7 -2
  445. package/dist/sdk/cli-contracts/commander-types.js.map +1 -1
  446. package/dist/sdk/cli-contracts/enum-contracts.d.ts +2 -2
  447. package/dist/sdk/cli-contracts/enum-contracts.js +4 -2
  448. package/dist/sdk/cli-contracts/enum-contracts.js.map +1 -1
  449. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +1 -0
  450. package/dist/sdk/cli-contracts/tool-option-contracts.js +53 -3
  451. package/dist/sdk/cli-contracts/tool-option-contracts.js.map +1 -1
  452. package/dist/sdk/cli-contracts/tool-parameter-tables.js +35 -6
  453. package/dist/sdk/cli-contracts/tool-parameter-tables.js.map +1 -1
  454. package/dist/sdk/cli-contracts.d.ts +19 -1
  455. package/dist/sdk/cli-contracts.js +187 -15
  456. package/dist/sdk/cli-contracts.js.map +1 -1
  457. package/dist/sdk/errors.d.ts +22 -0
  458. package/dist/sdk/errors.js +46 -0
  459. package/dist/sdk/errors.js.map +1 -0
  460. package/dist/sdk/index.d.ts +2 -1
  461. package/dist/sdk/index.js +3 -2
  462. package/dist/sdk/index.js.map +1 -1
  463. package/dist/sdk/package-import-adapters.js +14 -3
  464. package/dist/sdk/package-import-adapters.js.map +1 -1
  465. package/dist/sdk/runtime.d.ts +1 -0
  466. package/dist/sdk/runtime.js +3 -2
  467. package/dist/sdk/runtime.js.map +1 -1
  468. package/dist/sdk/testing.d.ts +77 -0
  469. package/dist/sdk/testing.js +239 -0
  470. package/dist/sdk/testing.js.map +1 -0
  471. package/dist/types.d.ts +19 -0
  472. package/dist/types.js +3 -2
  473. package/dist/types.js.map +1 -1
  474. package/docs/AGENT_GUIDE.md +21 -2
  475. package/docs/COMMANDS.md +85 -5
  476. package/docs/CONFIGURATION.md +49 -2
  477. package/docs/EXTENSIONS.md +118 -6
  478. package/docs/QUICKSTART.md +2 -0
  479. package/docs/RELEASING.md +2 -2
  480. package/docs/SDK.md +273 -1
  481. package/docs/TESTING.md +17 -0
  482. package/docs/examples/policy-restricted-extension/manifest.json +1 -0
  483. package/docs/examples/starter-extension/index.js +9 -1
  484. package/docs/examples/starter-extension/manifest.json +1 -0
  485. package/package.json +12 -6
  486. package/packages/pm-beads/extensions/beads/index.js +2 -4
  487. package/packages/pm-beads/extensions/beads/index.ts +43 -33
  488. package/packages/pm-beads/extensions/beads/manifest.json +12 -1
  489. package/packages/pm-calendar/README.md +6 -0
  490. package/packages/pm-calendar/extensions/calendar/index.js +6 -1
  491. package/packages/pm-calendar/extensions/calendar/index.ts +6 -1
  492. package/packages/pm-calendar/extensions/calendar/manifest.json +6 -1
  493. package/packages/pm-governance-audit/extensions/governance-audit/manifest.json +6 -1
  494. package/packages/pm-guide-shell/README.md +4 -0
  495. package/packages/pm-guide-shell/extensions/guide-shell/index.js +22 -0
  496. package/packages/pm-guide-shell/extensions/guide-shell/index.ts +22 -0
  497. package/packages/pm-guide-shell/extensions/guide-shell/manifest.json +6 -1
  498. package/packages/pm-guide-shell/extensions/guide-shell/runtime.js +74 -3
  499. package/packages/pm-guide-shell/extensions/guide-shell/runtime.ts +84 -4
  500. package/packages/pm-lifecycle-hooks/README.md +29 -0
  501. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.js +18 -0
  502. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/index.ts +20 -0
  503. package/packages/pm-lifecycle-hooks/extensions/lifecycle-hooks/manifest.json +9 -0
  504. package/packages/pm-lifecycle-hooks/package.json +52 -0
  505. package/packages/pm-linked-test-adapters/extensions/linked-test-adapters/manifest.json +13 -1
  506. package/packages/pm-search-advanced/extensions/search-advanced/index.js +69 -1
  507. package/packages/pm-search-advanced/extensions/search-advanced/index.ts +91 -2
  508. package/packages/pm-search-advanced/extensions/search-advanced/manifest.json +13 -1
  509. package/packages/pm-templates/extensions/templates/manifest.json +6 -1
  510. package/packages/pm-todos/extensions/todos/index.js +3 -7
  511. package/packages/pm-todos/extensions/todos/index.ts +55 -42
  512. package/packages/pm-todos/extensions/todos/manifest.json +13 -1
  513. package/scripts/bundle-cli.mjs +121 -17
  514. package/dist/cli-bundle/chunks/activity-OWYSUZOY.js +0 -17
  515. package/dist/cli-bundle/chunks/chunk-3M73P3G6.js.map +0 -7
  516. package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js +0 -189
  517. package/dist/cli-bundle/chunks/chunk-4AEZR5EJ.js.map +0 -7
  518. package/dist/cli-bundle/chunks/chunk-5HSEP75M.js.map +0 -7
  519. package/dist/cli-bundle/chunks/chunk-6HT2F4TK.js.map +0 -7
  520. package/dist/cli-bundle/chunks/chunk-7Y53ZJIQ.js.map +0 -7
  521. package/dist/cli-bundle/chunks/chunk-BUPWJ3IJ.js.map +0 -7
  522. package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js +0 -47
  523. package/dist/cli-bundle/chunks/chunk-EGUGFSNX.js.map +0 -7
  524. package/dist/cli-bundle/chunks/chunk-FM26RGSU.js +0 -56
  525. package/dist/cli-bundle/chunks/chunk-FM26RGSU.js.map +0 -7
  526. package/dist/cli-bundle/chunks/chunk-FQE6XZDB.js.map +0 -7
  527. package/dist/cli-bundle/chunks/chunk-GN7IJPCD.js.map +0 -7
  528. package/dist/cli-bundle/chunks/chunk-JTWRXG4B.js.map +0 -7
  529. package/dist/cli-bundle/chunks/chunk-JULRTHJQ.js.map +0 -7
  530. package/dist/cli-bundle/chunks/chunk-LSXGH6NE.js.map +0 -7
  531. package/dist/cli-bundle/chunks/chunk-MD7K4JYF.js.map +0 -7
  532. package/dist/cli-bundle/chunks/chunk-OGZEG5TT.js.map +0 -7
  533. package/dist/cli-bundle/chunks/chunk-P53TN6IA.js.map +0 -7
  534. package/dist/cli-bundle/chunks/chunk-PXUAZUUY.js.map +0 -7
  535. package/dist/cli-bundle/chunks/chunk-U7FMKRXH.js.map +0 -7
  536. package/dist/cli-bundle/chunks/chunk-VGICHR7D.js +0 -141
  537. package/dist/cli-bundle/chunks/chunk-VGICHR7D.js.map +0 -7
  538. package/dist/cli-bundle/chunks/chunk-WDPXDQFG.js.map +0 -7
  539. package/dist/cli-bundle/chunks/close-XY4CSAYF.js +0 -14
  540. package/dist/cli-bundle/chunks/config-V3FZOKLI.js.map +0 -7
  541. package/dist/cli-bundle/chunks/contracts-YLMH33VU.js.map +0 -7
  542. package/dist/cli-bundle/chunks/create-PZVHRIZQ.js +0 -28
  543. package/dist/cli-bundle/chunks/get-LTK3HOCQ.js.map +0 -7
  544. package/dist/cli-bundle/chunks/health-TCWL55KM.js.map +0 -7
  545. package/dist/cli-bundle/chunks/history-A2JUDXUE.js +0 -21
  546. package/dist/cli-bundle/chunks/history-redact-ED6RFCPL.js +0 -20
  547. package/dist/cli-bundle/chunks/init-M2WUB4YH.js +0 -16
  548. package/dist/cli-bundle/chunks/list-OGWQPC26.js +0 -20
  549. package/dist/cli-bundle/chunks/register-list-query-UP3VRUFS.js.map +0 -7
  550. package/dist/cli-bundle/chunks/register-mutation-YWSBF545.js.map +0 -7
  551. package/dist/cli-bundle/chunks/register-operations-3BDTGSDH.js.map +0 -7
  552. package/dist/cli-bundle/chunks/restore-MB2ISME7.js +0 -18
  553. package/dist/cli-bundle/chunks/schema-Q622KC46.js +0 -119
  554. package/dist/cli-bundle/chunks/schema-Q622KC46.js.map +0 -7
  555. package/dist/cli-bundle/chunks/search-HENBL456.js.map +0 -7
  556. package/dist/cli-bundle/chunks/test-VNBDRJ4Z.js +0 -32
  557. package/dist/cli-bundle/chunks/update-H6SCWNMA.js +0 -22
  558. package/dist/cli-bundle/chunks/update-many-46HRSP2Q.js.map +0 -7
  559. package/dist/cli-bundle/chunks/validate-TMCVKIGZ.js.map +0 -7
  560. /package/dist/cli-bundle/chunks/{activity-OWYSUZOY.js.map → activity-P5BUMWP3.js.map} +0 -0
  561. /package/dist/cli-bundle/chunks/{aggregate-ADUOSFRO.js.map → aggregate-OOAGKWRG.js.map} +0 -0
  562. /package/dist/cli-bundle/chunks/{chunk-G57E5D7T.js.map → chunk-ATBVS6WW.js.map} +0 -0
  563. /package/dist/cli-bundle/chunks/{chunk-KBQY3YG5.js.map → chunk-BNL6S7QH.js.map} +0 -0
  564. /package/dist/cli-bundle/chunks/{chunk-NGN7UV5K.js.map → chunk-CJDQB2ED.js.map} +0 -0
  565. /package/dist/cli-bundle/chunks/{chunk-D7AOMPRH.js.map → chunk-D3WUNETC.js.map} +0 -0
  566. /package/dist/cli-bundle/chunks/{chunk-L2FXEKDB.js.map → chunk-JB4RGL4V.js.map} +0 -0
  567. /package/dist/cli-bundle/chunks/{chunk-SEXQN4KL.js.map → chunk-K47WAYQV.js.map} +0 -0
  568. /package/dist/cli-bundle/chunks/{chunk-CEFIVZPG.js.map → chunk-KA24HME7.js.map} +0 -0
  569. /package/dist/cli-bundle/chunks/{chunk-A7E7PUVX.js.map → chunk-LDJK7SHN.js.map} +0 -0
  570. /package/dist/cli-bundle/chunks/{chunk-PVNQLCIS.js.map → chunk-RANZIID5.js.map} +0 -0
  571. /package/dist/cli-bundle/chunks/{chunk-JFWUHHS2.js.map → chunk-S3CV7JGJ.js.map} +0 -0
  572. /package/dist/cli-bundle/chunks/{chunk-LRBOHPUE.js.map → chunk-WIKR7KFL.js.map} +0 -0
  573. /package/dist/cli-bundle/chunks/{chunk-AKOOMO3T.js.map → chunk-XX5LRINW.js.map} +0 -0
  574. /package/dist/cli-bundle/chunks/{chunk-WJ2NAC37.js.map → chunk-Y2AKE2HS.js.map} +0 -0
  575. /package/dist/cli-bundle/chunks/{close-XY4CSAYF.js.map → close-RMHQ3KWH.js.map} +0 -0
  576. /package/dist/cli-bundle/chunks/{create-PZVHRIZQ.js.map → create-ATONSAZW.js.map} +0 -0
  577. /package/dist/cli-bundle/chunks/{extension-B4WL7BQU.js.map → extension-G6UXSM5S.js.map} +0 -0
  578. /package/dist/cli-bundle/chunks/{gc-JWNF66EC.js.map → gc-QNBRJG6H.js.map} +0 -0
  579. /package/dist/cli-bundle/chunks/{history-A2JUDXUE.js.map → history-6FC4H6HI.js.map} +0 -0
  580. /package/dist/cli-bundle/chunks/{history-redact-ED6RFCPL.js.map → history-redact-XKYEZDBL.js.map} +0 -0
  581. /package/dist/cli-bundle/chunks/{init-M2WUB4YH.js.map → init-KHX3FEEM.js.map} +0 -0
  582. /package/dist/cli-bundle/chunks/{list-OGWQPC26.js.map → list-53LZ2AEO.js.map} +0 -0
  583. /package/dist/cli-bundle/chunks/{restore-MB2ISME7.js.map → restore-JL5QIH7H.js.map} +0 -0
  584. /package/dist/cli-bundle/chunks/{test-VNBDRJ4Z.js.map → test-RJ4ZF35X.js.map} +0 -0
  585. /package/dist/cli-bundle/chunks/{test-runs-GX5HTPSF.js.map → test-runs-L2M7WKH7.js.map} +0 -0
  586. /package/dist/cli-bundle/chunks/{update-H6SCWNMA.js.map → update-PYLVHMRD.js.map} +0 -0
@@ -1,10 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- levenshteinDistanceWithinLimit
4
- } from "./chunks/chunk-EAOG77HM.js";
5
2
  import {
6
3
  migrateItemFilesToFormat
7
- } from "./chunks/chunk-KBQY3YG5.js";
4
+ } from "./chunks/chunk-BNL6S7QH.js";
8
5
  import {
9
6
  applyDefaultOutputFormat,
10
7
  clearResolvedGlobalOptions,
@@ -14,33 +11,32 @@ import {
14
11
  getGlobalOptions,
15
12
  invalidateSearchCachesForMutation,
16
13
  setResolvedGlobalOptions
17
- } from "./chunks/chunk-P53TN6IA.js";
14
+ } from "./chunks/chunk-TK633IVD.js";
18
15
  import {
19
16
  PM_CORE_COMMAND_NAMES,
20
17
  resolveSubcommandFlagContractsForCommand
21
- } from "./chunks/chunk-GN7IJPCD.js";
22
- import "./chunks/chunk-6HT2F4TK.js";
18
+ } from "./chunks/chunk-ZQ4F6EC4.js";
19
+ import "./chunks/chunk-5IRA6IYD.js";
23
20
  import {
24
21
  printError,
25
22
  printResult,
26
23
  writeStdout
27
- } from "./chunks/chunk-5HSEP75M.js";
24
+ } from "./chunks/chunk-HZOS2UG5.js";
28
25
  import {
29
- resolvePmPackageRootFromModule
30
- } from "./chunks/chunk-EGUGFSNX.js";
31
- import "./chunks/chunk-BUPWJ3IJ.js";
32
- import "./chunks/chunk-4AEZR5EJ.js";
33
- import "./chunks/chunk-CEFIVZPG.js";
34
- import "./chunks/chunk-MD7K4JYF.js";
26
+ levenshteinDistanceWithinLimit
27
+ } from "./chunks/chunk-EAOG77HM.js";
28
+ import "./chunks/chunk-XG7RJYHV.js";
29
+ import "./chunks/chunk-KA24HME7.js";
30
+ import "./chunks/chunk-HPH6X4ZZ.js";
35
31
  import {
36
32
  commandOptionFlagLabel,
37
33
  resolveCommandOptionPolicyState,
38
34
  resolveItemTypeRegistry,
39
35
  resolveTypeDefinition
40
- } from "./chunks/chunk-WDPXDQFG.js";
36
+ } from "./chunks/chunk-4PJQSECJ.js";
41
37
  import {
42
38
  nowIso
43
- } from "./chunks/chunk-PVNQLCIS.js";
39
+ } from "./chunks/chunk-RANZIID5.js";
44
40
  import {
45
41
  BUILTIN_ITEM_TYPE_VALUES,
46
42
  EXIT_CODE,
@@ -49,6 +45,9 @@ import {
49
45
  appendLineAtomic,
50
46
  asRecordOrNull,
51
47
  clearActiveExtensionHooks,
48
+ consumeAfterCommandAffectedItems,
49
+ createEmptyExtensionRegistrationRegistry,
50
+ discoverExtensions,
52
51
  getActiveCommandResult,
53
52
  getActiveExtensionRegistrations,
54
53
  getSettingsPath,
@@ -58,6 +57,7 @@ import {
58
57
  readSettings,
59
58
  readSettingsWithMetadata,
60
59
  resolveGlobalPmRoot,
60
+ resolvePmPackageRootFromModule,
61
61
  resolvePmRoot,
62
62
  resolveRuntimeFieldRegistry,
63
63
  resolveTelemetryErrorCategory,
@@ -79,7 +79,7 @@ import {
79
79
  toNonEmptyStringOrUndefined,
80
80
  writeFileAtomic,
81
81
  writeSettings
82
- } from "./chunks/chunk-LSXGH6NE.js";
82
+ } from "./chunks/chunk-SRVKTWPR.js";
83
83
 
84
84
  // dist/cli/main.js
85
85
  import fs2 from "node:fs";
@@ -92,13 +92,13 @@ import { stdin as input, stdout as output } from "node:process";
92
92
  !(function() {
93
93
  try {
94
94
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
95
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "6fcbb185-889c-5474-9f02-321a53177803");
95
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "c965da5d-6609-5258-ba49-a57475f7f2ef");
96
96
  } catch (e2) {
97
97
  }
98
98
  })();
99
99
  var TELEMETRY_PROMPT_DISABLE_ENV = "PM_TELEMETRY_PROMPT";
100
100
  var TELEMETRY_PROMPT_DISABLE_VALUES = /* @__PURE__ */ new Set(["0", "false", "no", "off"]);
101
- var TELEMETRY_PROMPT_SKIPPED_COMMANDS = /* @__PURE__ */ new Set(["init", "completion", "completion-tags"]);
101
+ var TELEMETRY_PROMPT_SKIPPED_COMMANDS = /* @__PURE__ */ new Set(["init", "completion", "completion-statuses", "completion-tags", "completion-types"]);
102
102
  function parseBooleanLike(value) {
103
103
  if (typeof value !== "string") {
104
104
  return false;
@@ -180,11 +180,11 @@ import path from "node:path";
180
180
  !(function() {
181
181
  try {
182
182
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
183
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "05b6b4cc-d37d-593c-b34c-b491c722d181");
183
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ad10a6ab-5a76-55e1-9750-1613c8210700");
184
184
  } catch (e2) {
185
185
  }
186
186
  })();
187
- var SETUP_ROOT_COMMANDS = /* @__PURE__ */ new Set(["init", "config", "completion", "completion-tags"]);
187
+ var SETUP_ROOT_COMMANDS = /* @__PURE__ */ new Set(["init", "config", "completion", "completion-statuses", "completion-tags", "completion-types"]);
188
188
  var QUERY_ROOT_COMMANDS = /* @__PURE__ */ new Set([
189
189
  "list",
190
190
  "list-all",
@@ -210,6 +210,7 @@ var MUTATION_ROOT_COMMANDS = /* @__PURE__ */ new Set([
210
210
  "create",
211
211
  "update",
212
212
  "update-many",
213
+ "close-many",
213
214
  "append",
214
215
  "close",
215
216
  "delete",
@@ -2344,7 +2345,7 @@ function parseLooseCommandOptions(args) {
2344
2345
  !(function() {
2345
2346
  try {
2346
2347
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
2347
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "87ab8982-4eaf-5b48-88af-96ff4450ab0f");
2348
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ed65d7db-f9b0-5c53-ba96-b13eb4d6cd35");
2348
2349
  } catch (e2) {
2349
2350
  }
2350
2351
  })();
@@ -2488,6 +2489,70 @@ var HELP_BY_COMMAND_PATH = {
2488
2489
  "Use --dry-run before upgrade when automation needs a deterministic plan."
2489
2490
  ]
2490
2491
  },
2492
+ "package init": {
2493
+ why: "Generates an installable starter pm package with package metadata and a root extension entrypoint.",
2494
+ examples: [
2495
+ "pm package init ./my-package",
2496
+ "pm install ./my-package --project",
2497
+ "pm package doctor --project --detail summary"
2498
+ ],
2499
+ tips: [
2500
+ "The generated package is local-install safe; add SDK runtime imports only after declaring dependencies and validating with package doctor.",
2501
+ "Use package doctor after changes to verify activation, policy, and collision diagnostics."
2502
+ ]
2503
+ },
2504
+ "package install": {
2505
+ why: "Installs pm packages from local paths, npm sources, GitHub sources, bundled aliases, or wildcard/all aliases.",
2506
+ examples: [
2507
+ "pm package install ./my-package --project",
2508
+ "pm install npm:pm-changelog --project",
2509
+ "pm package install --github org/repo/packages/my-pm-package --ref main"
2510
+ ],
2511
+ tips: [
2512
+ "Prefer the top-level pm install alias in scripts when only installation is needed.",
2513
+ "Run pm package manage or pm package doctor after installing external packages."
2514
+ ]
2515
+ },
2516
+ "package catalog": {
2517
+ why: "Lists bundled first-party package catalog metadata and compact field projections.",
2518
+ examples: [
2519
+ "pm package catalog --project",
2520
+ "pm package catalog --project --fields alias,installed,install_command",
2521
+ "pm package list --project --fields alias,package_name,category"
2522
+ ],
2523
+ tips: [
2524
+ "Use --fields for low-token package discovery in agent loops.",
2525
+ "External npm package discovery still belongs to npm search."
2526
+ ]
2527
+ },
2528
+ "extension init": {
2529
+ why: "Generates an installable starter runtime extension with manifest and entrypoint files.",
2530
+ examples: [
2531
+ "pm extension init ./my-extension",
2532
+ "pm extension --install --project ./my-extension",
2533
+ "pm extension --doctor --project --detail summary"
2534
+ ],
2535
+ tips: [
2536
+ "Use package init for new distributable package workflows; extension init is the compatibility-level runtime scaffold."
2537
+ ]
2538
+ },
2539
+ "extension install": {
2540
+ why: "Installs a compatibility runtime extension from local, npm, GitHub, bundled alias, or wildcard sources.",
2541
+ examples: [
2542
+ "pm extension install ./my-extension --project",
2543
+ "pm extension --install --project ./my-extension",
2544
+ "pm extension doctor --project --detail summary"
2545
+ ],
2546
+ tips: ["Prefer pm install or pm package install for new package-first automation."]
2547
+ },
2548
+ "extension catalog": {
2549
+ why: "Compatibility view of bundled package catalog metadata.",
2550
+ examples: [
2551
+ "pm extension catalog --project",
2552
+ "pm extension catalog --project --fields alias,installed,install_command"
2553
+ ],
2554
+ tips: ["Prefer pm package catalog in new user-facing workflows."]
2555
+ },
2491
2556
  install: {
2492
2557
  why: "Installs a pm package into project scope by default, using local, npm, GitHub, or bundled alias sources.",
2493
2558
  examples: [
@@ -2553,6 +2618,21 @@ var HELP_BY_COMMAND_PATH = {
2553
2618
  "Checkpoints are enabled by default for apply mode and can be restored with --rollback."
2554
2619
  ]
2555
2620
  },
2621
+ "close-many": {
2622
+ why: "Bulk-closes matched items with a shared reason routed through full pm close semantics (close validation, active-child orphan checks, blocked-edge cleanup) plus dry-run previews and rollback checkpoints \u2014 unlike update-many --status closed, which bypasses close validation.",
2623
+ examples: [
2624
+ 'pm close-many --filter-sprint S-12 --reason "Sprint S-12 acceptance criteria met" --dry-run',
2625
+ 'pm close-many --filter-tag wave:7 --reason "Superseded by redesign" --validate-close warn',
2626
+ 'pm close-many --ids pm-a,pm-b,pm-c --reason "Closed in batch" --resolution "Verified by integration suite"',
2627
+ "pm close-many --rollback close-many-20260604-abc123"
2628
+ ],
2629
+ tips: [
2630
+ "At least one filter (--filter-* or --ids) is required so close-many never matches every item.",
2631
+ "Already-terminal matches are skipped by default; pass --force to re-close them.",
2632
+ "Use --dry-run to preview matches plus per-item skip reasons and active-child orphan warnings before applying.",
2633
+ "Checkpoints are enabled by default for apply mode; restore with --rollback <checkpoint-id>."
2634
+ ]
2635
+ },
2556
2636
  normalize: {
2557
2637
  why: "Scans items for low-signal lifecycle metadata drift, emits deterministic per-item plans, and optionally applies normalized metadata updates with update-style safety checks.",
2558
2638
  examples: [
@@ -2715,7 +2795,7 @@ var HELP_BY_COMMAND_PATH = {
2715
2795
  "pm get pm-a1b2 --fields id,title,status,parent,type --json"
2716
2796
  ],
2717
2797
  tips: [
2718
- "Default depth is deep for backward compatibility; use brief for metadata-only checks and standard for body plus linked artifacts without append-only logs.",
2798
+ "Default depth is standard for body plus linked artifacts without append-only logs; use brief for metadata-only checks or --full for complete history-heavy metadata.",
2719
2799
  "Use --fields for the smallest deterministic item metadata payload when an agent only needs specific fields.",
2720
2800
  "JSON output shape is { item, body, linked, claim_state }; body is top-level (not item.body)."
2721
2801
  ]
@@ -2980,7 +3060,7 @@ function attachRichHelpText(program2, argv = process.argv.slice(2)) {
2980
3060
  !(function() {
2981
3061
  try {
2982
3062
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
2983
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "92cba1f2-f9c5-5748-90ce-ab2049ada502");
3063
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7f17a5b9-5783-523d-b9cd-61968ddd9ed2");
2984
3064
  } catch (e2) {
2985
3065
  }
2986
3066
  })();
@@ -2996,13 +3076,17 @@ function normalizeLongOptionFlag(token) {
2996
3076
  }
2997
3077
  function extractProvidedOptionFlags(argv) {
2998
3078
  const provided = /* @__PURE__ */ new Set();
3079
+ const ordered = [];
2999
3080
  for (const token of argv) {
3000
3081
  const normalized = normalizeLongOptionFlag(token);
3001
3082
  if (normalized) {
3083
+ if (!provided.has(normalized)) {
3084
+ ordered.push(normalized);
3085
+ }
3002
3086
  provided.add(normalized);
3003
3087
  }
3004
3088
  }
3005
- return [...provided].sort((left, right) => left.localeCompare(right));
3089
+ return ordered;
3006
3090
  }
3007
3091
  function quoteCommandArg(arg) {
3008
3092
  if (/^[A-Za-z0-9._:/@=-]+$/.test(arg)) {
@@ -3018,7 +3102,7 @@ function renderPmCommand(argv) {
3018
3102
  !(function() {
3019
3103
  try {
3020
3104
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3021
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "98367a9e-b72b-56c3-a337-fcc10e562f6e");
3105
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "883618a4-a53f-5506-ab97-d734647806e7");
3022
3106
  } catch (e2) {
3023
3107
  }
3024
3108
  })();
@@ -3181,6 +3265,10 @@ function guidanceToClassification(message) {
3181
3265
  function normalizeMessage(message) {
3182
3266
  return message.replace(/\(outputHelp\)/g, "").trim();
3183
3267
  }
3268
+ function isModuleResolutionErrorMessage(message) {
3269
+ const normalized = message.toLowerCase();
3270
+ return normalized.includes("cannot find module") || normalized.includes("cannot find package") || normalized.includes("err_module_not_found") || normalized.includes("module_not_found");
3271
+ }
3184
3272
  function normalizeContextList(values) {
3185
3273
  if (!Array.isArray(values)) {
3186
3274
  return void 0;
@@ -3600,10 +3688,26 @@ function formatUnknownErrorForJson(rawMessage, exitCode) {
3600
3688
  return guidanceToJsonEnvelope(guidance, exitCode);
3601
3689
  }
3602
3690
  function buildUnknownErrorGuidance(rawMessage) {
3691
+ const message = normalizeMessage(rawMessage);
3692
+ if (isModuleResolutionErrorMessage(message)) {
3693
+ return makeGuidanceMessage({
3694
+ code: "module_import_failed",
3695
+ title: "Module import failed",
3696
+ happened: message,
3697
+ required: "Ensure the active checkout is built and any package or extension entry file exists before retrying.",
3698
+ why: "Node could not resolve an imported module. In pm this usually means an extension/package entrypoint, build artifact, or dependency is missing from the active runtime.",
3699
+ examples: ["pnpm build", "pm package manage --doctor --project", "pm health --check-only --json"],
3700
+ nextSteps: [
3701
+ "Rebuild the checkout or package that provides the missing module.",
3702
+ "Run package doctor for installed extensions when the failure follows package installation or activation.",
3703
+ "Rerun the original pm command after the runtime files are present."
3704
+ ]
3705
+ });
3706
+ }
3603
3707
  return makeGuidanceMessage({
3604
3708
  code: "unknown_error",
3605
3709
  title: "Unhandled error",
3606
- happened: normalizeMessage(rawMessage),
3710
+ happened: message,
3607
3711
  required: "Inspect command input and runtime state, then retry.",
3608
3712
  why: "Unexpected runtime failures can occur from environment or extension-level issues.",
3609
3713
  examples: ["pm --help", "pm health --json"]
@@ -4009,7 +4113,7 @@ function ensureCommandPath(root, pathParts) {
4009
4113
  !(function() {
4010
4114
  try {
4011
4115
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
4012
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "09a59142-b988-5127-9105-7bdfc1f9c832");
4116
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "abcf109c-c846-5b61-b510-f1ad6ff4f3aa");
4013
4117
  } catch (e2) {
4014
4118
  }
4015
4119
  })();
@@ -4520,7 +4624,8 @@ function normalizeBootstrapInvocation(argv) {
4520
4624
  }
4521
4625
  const aliasNormalized = rewriteCommandAlias(legacyNormalized, trace);
4522
4626
  const commandName = parseBootstrapCommandName(aliasNormalized);
4523
- const lookup = buildFlagLookup(commandName);
4627
+ const commandPathName = parseBootstrapCommandPathName(aliasNormalized);
4628
+ const lookup = buildFlagLookup(commandPathName ?? commandName);
4524
4629
  const normalizedArgv = [];
4525
4630
  for (let index = 0; index < aliasNormalized.length; index += 1) {
4526
4631
  const token = aliasNormalized[index];
@@ -4564,6 +4669,15 @@ function normalizeBootstrapInvocation(argv) {
4564
4669
  trace
4565
4670
  };
4566
4671
  }
4672
+ function parseBootstrapCommandPathName(argv) {
4673
+ const stripped = stripGlobalBootstrapTokens(argv);
4674
+ const first = stripped[0]?.trim().toLowerCase();
4675
+ const second = stripped[1]?.trim().toLowerCase();
4676
+ if ((first === "extension" || first === "package" || first === "packages") && typeof second === "string" && second.length > 0 && !second.startsWith("-")) {
4677
+ return `${first} ${second}`;
4678
+ }
4679
+ return first;
4680
+ }
4567
4681
  function parseBootstrapTypeValue(argv) {
4568
4682
  for (let index = 0; index < argv.length; index += 1) {
4569
4683
  const token = argv[index];
@@ -5427,7 +5541,7 @@ function attachCreateUpdatePolicyHelpText(rootProgram, typeRegistry, argv) {
5427
5541
  !(function() {
5428
5542
  try {
5429
5543
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5430
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "fb080e3e-ad71-5608-a944-ce887395e3e9");
5544
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "85d31f87-d392-5da2-9d53-1525fb938ff2");
5431
5545
  } catch (e2) {
5432
5546
  }
5433
5547
  })();
@@ -5457,6 +5571,7 @@ var TELEMETRY_COMMAND_RESOLUTION_SET = /* @__PURE__ */ new Set([
5457
5571
  var TELEMETRY_RESOLUTION_STAGE_SET = /* @__PURE__ */ new Set(["parse", "preflight", "execute", "unknown"]);
5458
5572
  var TELEMETRY_ERROR_CATEGORY_SET = /* @__PURE__ */ new Set(["usage", "validation", "conflict", "runtime", "unknown"]);
5459
5573
  var runtimeExtensionSnapshotCache = null;
5574
+ var runtimeExtensionDiscoverySnapshotCache = null;
5460
5575
  var activeRuntimeExtensionCommandDescriptors = /* @__PURE__ */ new Map();
5461
5576
  var HANDLED_ERROR_SENTRY_FLUSH_TIMEOUT_MS = 250;
5462
5577
  var EXPECTED_HANDLED_ERROR_EXIT_CODES = /* @__PURE__ */ new Set([
@@ -5465,10 +5580,10 @@ var EXPECTED_HANDLED_ERROR_EXIT_CODES = /* @__PURE__ */ new Set([
5465
5580
  EXIT_CODE.CONFLICT
5466
5581
  ]);
5467
5582
  var TRUE_LIKE_ENV_VALUES = /* @__PURE__ */ new Set(["1", "true", "yes", "on"]);
5468
- var loadSetupRegistrationModule = createLazyModule(() => import("./chunks/register-setup-V56GDRUS.js"));
5469
- var loadListQueryRegistrationModule = createLazyModule(() => import("./chunks/register-list-query-UP3VRUFS.js"));
5470
- var loadMutationRegistrationModule = createLazyModule(() => import("./chunks/register-mutation-YWSBF545.js"));
5471
- var loadOperationRegistrationModule = createLazyModule(() => import("./chunks/register-operations-3BDTGSDH.js"));
5583
+ var loadSetupRegistrationModule = createLazyModule(() => import("./chunks/register-setup-YJKIQRKA.js"));
5584
+ var loadListQueryRegistrationModule = createLazyModule(() => import("./chunks/register-list-query-AG3XKXWL.js"));
5585
+ var loadMutationRegistrationModule = createLazyModule(() => import("./chunks/register-mutation-RSMT6DPK.js"));
5586
+ var loadOperationRegistrationModule = createLazyModule(() => import("./chunks/register-operations-Q54JQZUN.js"));
5472
5587
  function describeUnknownError(error) {
5473
5588
  if (error instanceof PmCliError) {
5474
5589
  return error.message;
@@ -5533,7 +5648,7 @@ function buildPmCliRecoveryContext(context, invocationArgv, rawMessage) {
5533
5648
  if (!suggestedRetry) {
5534
5649
  suggestedRetry = attemptedCommand;
5535
5650
  }
5536
- if (suggestedRetry === attemptedCommand) {
5651
+ if (!existingRecovery?.suggested_retry && suggestedRetry === attemptedCommand) {
5537
5652
  suggestedRetry = void 0;
5538
5653
  }
5539
5654
  const recovery = {
@@ -5711,17 +5826,28 @@ async function runAndClearAfterCommandHooks(outcome) {
5711
5826
  clearActiveExtensionHooks();
5712
5827
  return;
5713
5828
  }
5714
- const hookWarnings = await runAfterCommandHooks(runtime.hooks, {
5715
- command: runtime.commandName,
5716
- args: runtime.commandArgs,
5717
- options: { ...runtime.commandOptions },
5718
- global: { ...runtime.globalOptions },
5719
- pm_root: runtime.pmRoot,
5720
- ok: outcome.ok,
5721
- error: outcome.error,
5722
- result: getActiveCommandResult()
5723
- });
5724
- clearActiveExtensionHooks();
5829
+ let hookWarnings = [];
5830
+ try {
5831
+ hookWarnings = await runAfterCommandHooks(runtime.hooks, {
5832
+ command: runtime.commandName,
5833
+ args: runtime.commandArgs,
5834
+ options: { ...runtime.commandOptions },
5835
+ global: { ...runtime.globalOptions },
5836
+ pm_root: runtime.pmRoot,
5837
+ ok: outcome.ok,
5838
+ error: outcome.error,
5839
+ result: getActiveCommandResult(),
5840
+ affected: consumeAfterCommandAffectedItems()
5841
+ });
5842
+ } catch (error) {
5843
+ const message = error instanceof Error ? error.message : String(error);
5844
+ hookWarnings = [`afterCommand hooks failed: ${message}`];
5845
+ } finally {
5846
+ clearActiveExtensionHooks();
5847
+ }
5848
+ if (!runtime.globalOptions.json && hookWarnings.length > 0) {
5849
+ printError(`[pm] warning: afterCommand hook_warnings=${formatHookWarnings(hookWarnings)}`);
5850
+ }
5725
5851
  if (runtime.profileEnabled && hookWarnings.length > 0) {
5726
5852
  printError(`profile:extensions hook_warnings=${formatHookWarnings(hookWarnings)}`);
5727
5853
  }
@@ -5920,6 +6046,18 @@ async function registerRuntimeSchemaFieldFlags(rootProgram, invocationArgv) {
5920
6046
  }
5921
6047
  }
5922
6048
  }
6049
+ async function maybeAttachCreateUpdatePolicyHelpText(rootProgram, pmRoot, invocationArgv, registrations, settings) {
6050
+ const bootstrapCommand = parseBootstrapCommandName(invocationArgv);
6051
+ if (bootstrapCommand !== "create" && bootstrapCommand !== "update") {
6052
+ return;
6053
+ }
6054
+ try {
6055
+ const resolvedSettings = settings ?? await readSettings(pmRoot);
6056
+ const typeRegistry = resolveItemTypeRegistry(resolvedSettings, registrations);
6057
+ attachCreateUpdatePolicyHelpText(rootProgram, typeRegistry, invocationArgv);
6058
+ } catch {
6059
+ }
6060
+ }
5923
6061
  function defaultPreflightDecision() {
5924
6062
  return {
5925
6063
  enforce_item_format_gate: true,
@@ -5931,6 +6069,180 @@ function defaultPreflightDecision() {
5931
6069
  function buildRuntimeExtensionSnapshotCacheKey(pmRoot) {
5932
6070
  return `pm-root:${pmRoot}`;
5933
6071
  }
6072
+ function bootstrapProfileEnabled(invocationArgv) {
6073
+ return invocationArgv.some((token) => token === "--profile");
6074
+ }
6075
+ function buildRuntimeExtensionDiscoverySnapshotCacheKey(pmRoot) {
6076
+ return `pm-root:${pmRoot}`;
6077
+ }
6078
+ function collectLeadingCommandArgs(commandArgs) {
6079
+ const leading = [];
6080
+ for (const arg of commandArgs ?? []) {
6081
+ if (arg.startsWith("-")) {
6082
+ break;
6083
+ }
6084
+ const normalized = normalizeExtensionCommandPath(arg);
6085
+ if (normalized.length === 0) {
6086
+ continue;
6087
+ }
6088
+ leading.push(normalized);
6089
+ }
6090
+ return leading;
6091
+ }
6092
+ function collectActivationCommandCandidates(probe) {
6093
+ const commandPath = normalizeExtensionCommandPath(probe.commandPath ?? "");
6094
+ if (commandPath.length === 0) {
6095
+ return [];
6096
+ }
6097
+ const candidates = [commandPath];
6098
+ const parts = commandPath.split(" ").filter((part) => part.length > 0);
6099
+ for (const arg of collectLeadingCommandArgs(probe.commandArgs)) {
6100
+ parts.push(...arg.split(" ").filter((part) => part.length > 0));
6101
+ candidates.push(parts.join(" "));
6102
+ }
6103
+ return [...new Set(candidates)];
6104
+ }
6105
+ function activationCommandMatchesProbe(command, probe) {
6106
+ const normalized = normalizeExtensionCommandPath(command);
6107
+ if (normalized.length === 0) {
6108
+ return false;
6109
+ }
6110
+ const candidates = collectActivationCommandCandidates(probe);
6111
+ for (const candidate of candidates) {
6112
+ if (candidate === normalized || candidate.startsWith(`${normalized} `)) {
6113
+ return true;
6114
+ }
6115
+ }
6116
+ if (probe.allowCommandPrefixMatch === true) {
6117
+ return candidates.some((candidate) => normalized.startsWith(`${candidate} `));
6118
+ }
6119
+ return false;
6120
+ }
6121
+ function extensionActivationCommands(extension) {
6122
+ return extension.activation?.commands ?? [];
6123
+ }
6124
+ function extensionCapabilities(extension) {
6125
+ return new Set((extension.capabilities ?? []).map((capability) => capability.trim().toLowerCase()));
6126
+ }
6127
+ var GLOBAL_EXTENSION_ACTIVATION_CAPABILITIES = /* @__PURE__ */ new Set(["hooks", "parser", "preflight", "renderers"]);
6128
+ var CONSERVATIVE_EXTENSION_ACTIVATION_CAPABILITIES = /* @__PURE__ */ new Set(["commands", "schema", "services"]);
6129
+ var SEARCH_EXTENSION_ACTIVATION_COMMANDS = /* @__PURE__ */ new Set(["reindex", "search", "search-advanced"]);
6130
+ var CREATE_TEMPLATE_FLAGS = /* @__PURE__ */ new Set(["--template"]);
6131
+ function hasAnyCapability(capabilities, expected) {
6132
+ for (const capability of expected) {
6133
+ if (capabilities.has(capability)) {
6134
+ return true;
6135
+ }
6136
+ }
6137
+ return false;
6138
+ }
6139
+ function commandPathNeedsSearchExtensions(commandPath) {
6140
+ const normalized = normalizeExtensionCommandPath(commandPath ?? "");
6141
+ if (normalized.length === 0) {
6142
+ return false;
6143
+ }
6144
+ const [topLevel] = normalized.split(" ");
6145
+ return SEARCH_EXTENSION_ACTIVATION_COMMANDS.has(topLevel ?? normalized);
6146
+ }
6147
+ function probeUsesAnyFlag(probe, flags) {
6148
+ for (const arg of probe.commandArgs ?? []) {
6149
+ if (!arg.startsWith("--")) {
6150
+ continue;
6151
+ }
6152
+ const [flagName] = arg.split("=", 1);
6153
+ if (flags.has(flagName)) {
6154
+ return true;
6155
+ }
6156
+ }
6157
+ return false;
6158
+ }
6159
+ function commandPathNeedsTemplateExtensions(probe) {
6160
+ return normalizeExtensionCommandPath(probe.commandPath ?? "") === "create" && probeUsesAnyFlag(probe, CREATE_TEMPLATE_FLAGS);
6161
+ }
6162
+ function extensionProvidesTemplatesRuntime(commands) {
6163
+ return commands.some((command) => {
6164
+ const normalized = normalizeExtensionCommandPath(command);
6165
+ return normalized === "templates" || normalized.startsWith("templates ");
6166
+ });
6167
+ }
6168
+ function extensionNeedsActivationForProbe(extension, probe) {
6169
+ const capabilities = extensionCapabilities(extension);
6170
+ const commands = extensionActivationCommands(extension);
6171
+ if (commands.length > 0 && commands.some((command) => activationCommandMatchesProbe(command, probe))) {
6172
+ return true;
6173
+ }
6174
+ if (hasAnyCapability(capabilities, GLOBAL_EXTENSION_ACTIVATION_CAPABILITIES)) {
6175
+ return true;
6176
+ }
6177
+ if (commandPathNeedsTemplateExtensions(probe) && extensionProvidesTemplatesRuntime(commands)) {
6178
+ return true;
6179
+ }
6180
+ if (capabilities.has("search")) {
6181
+ return commandPathNeedsSearchExtensions(probe.commandPath);
6182
+ }
6183
+ if (commands.length > 0) {
6184
+ return false;
6185
+ }
6186
+ if (hasAnyCapability(capabilities, CONSERVATIVE_EXTENSION_ACTIVATION_CAPABILITIES)) {
6187
+ return true;
6188
+ }
6189
+ if (capabilities.has("importers")) {
6190
+ return probe.allowCommandPrefixMatch === true;
6191
+ }
6192
+ return false;
6193
+ }
6194
+ function discoveryNeedsActivationForProbe(discovery, probe) {
6195
+ if (discovery.effective.length === 0) {
6196
+ return false;
6197
+ }
6198
+ const hasCommandProbe = normalizeExtensionCommandPath(probe.commandPath ?? "").length > 0;
6199
+ if (!hasCommandProbe) {
6200
+ return discovery.effective.some((extension) => {
6201
+ const capabilities = extensionCapabilities(extension);
6202
+ return extensionActivationCommands(extension).length > 0 || hasAnyCapability(capabilities, GLOBAL_EXTENSION_ACTIVATION_CAPABILITIES) || hasAnyCapability(capabilities, CONSERVATIVE_EXTENSION_ACTIVATION_CAPABILITIES) || capabilities.has("importers") || capabilities.has("search");
6203
+ });
6204
+ }
6205
+ return discovery.effective.some((extension) => extensionNeedsActivationForProbe(extension, probe));
6206
+ }
6207
+ function buildBootstrapActivationProbe(invocationArgv) {
6208
+ const helpRequest = parseBootstrapHelpRequest(invocationArgv);
6209
+ if (helpRequest.requested && helpRequest.commandPathTokens.length > 0) {
6210
+ const [commandPath, ...commandArgs] = helpRequest.commandPathTokens;
6211
+ return {
6212
+ commandPath,
6213
+ commandArgs,
6214
+ allowCommandPrefixMatch: true
6215
+ };
6216
+ }
6217
+ const stripped = stripGlobalBootstrapTokens(invocationArgv);
6218
+ const commandIndex = stripped.findIndex((token) => token.trim().length > 0 && !token.startsWith("-"));
6219
+ if (commandIndex < 0) {
6220
+ return {};
6221
+ }
6222
+ return {
6223
+ commandPath: stripped[commandIndex],
6224
+ commandArgs: stripped.slice(commandIndex + 1),
6225
+ allowCommandPrefixMatch: helpRequest.requested
6226
+ };
6227
+ }
6228
+ function collectParsedActivationCommandArgs(command) {
6229
+ const commandArgs = command.args.map(String);
6230
+ const commandPath = normalizeExtensionCommandPath(getCommandPath(command));
6231
+ if (commandPath === "create") {
6232
+ const options = command.optsWithGlobals();
6233
+ if (typeof options.template === "string" && options.template.trim().length > 0) {
6234
+ commandArgs.push("--template");
6235
+ }
6236
+ }
6237
+ return commandArgs;
6238
+ }
6239
+ function emitSettingsReadWarnings(warnings) {
6240
+ for (const warning of warnings) {
6241
+ if (warning.startsWith("settings_read_")) {
6242
+ printError(`[pm] warning: ${warning} \u2014 settings.json could not be loaded and pm fell back to defaults; run pm health for remediation.`);
6243
+ }
6244
+ }
6245
+ }
5934
6246
  function emitExtensionProfile(globalOptions, snapshot) {
5935
6247
  if (!globalOptions.profile) {
5936
6248
  return;
@@ -5940,6 +6252,55 @@ function emitExtensionProfile(globalOptions, snapshot) {
5940
6252
  printError(`profile:extensions activation_warnings=${formatHookWarnings(snapshot.activationWarnings)}`);
5941
6253
  }
5942
6254
  }
6255
+ function emitExtensionSkippedProfile(profileEnabled, snapshot, probe) {
6256
+ if (!profileEnabled) {
6257
+ return;
6258
+ }
6259
+ const command = normalizeExtensionCommandPath(probe.commandPath ?? "") || "<none>";
6260
+ printError(`profile:extensions activation=skipped command=${command} effective=${snapshot.discovery.effective.length} warnings=${snapshot.discovery.warnings.length} discovery_ms=${snapshot.discoveryMs}`);
6261
+ }
6262
+ async function loadRuntimeExtensionDiscoverySnapshot(pmRoot) {
6263
+ const cacheKey = buildRuntimeExtensionDiscoverySnapshotCacheKey(pmRoot);
6264
+ if (runtimeExtensionDiscoverySnapshotCache?.key === cacheKey) {
6265
+ return runtimeExtensionDiscoverySnapshotCache.snapshot;
6266
+ }
6267
+ const settingsPath = getSettingsPath(pmRoot);
6268
+ if (!await pathExists(settingsPath)) {
6269
+ runtimeExtensionDiscoverySnapshotCache = {
6270
+ key: cacheKey,
6271
+ snapshot: null
6272
+ };
6273
+ return null;
6274
+ }
6275
+ try {
6276
+ const startedAt = Date.now();
6277
+ const { settings, warnings: settingsReadWarnings } = await readSettingsWithMetadata(pmRoot);
6278
+ const discovery = await discoverExtensions({
6279
+ pmRoot,
6280
+ settings,
6281
+ cwd: process.cwd(),
6282
+ noExtensions: false
6283
+ });
6284
+ const snapshot = {
6285
+ pmRoot,
6286
+ settings,
6287
+ discovery,
6288
+ discoveryMs: Date.now() - startedAt,
6289
+ settingsReadWarnings: [...settingsReadWarnings]
6290
+ };
6291
+ runtimeExtensionDiscoverySnapshotCache = {
6292
+ key: cacheKey,
6293
+ snapshot
6294
+ };
6295
+ return snapshot;
6296
+ } catch {
6297
+ runtimeExtensionDiscoverySnapshotCache = {
6298
+ key: cacheKey,
6299
+ snapshot: null
6300
+ };
6301
+ return null;
6302
+ }
6303
+ }
5943
6304
  async function loadRuntimeExtensionSnapshot(pmRoot) {
5944
6305
  const cacheKey = buildRuntimeExtensionSnapshotCacheKey(pmRoot);
5945
6306
  if (runtimeExtensionSnapshotCache?.key === cacheKey) {
@@ -6003,9 +6364,26 @@ async function loadRuntimeExtensionSnapshot(pmRoot) {
6003
6364
  async function maybeLoadRuntimeExtensions(command) {
6004
6365
  const globalOptions = getGlobalOptions(command);
6005
6366
  if (globalOptions.noExtensions) {
6367
+ const noExtPmRoot = resolvePmRoot(process.cwd(), globalOptions.path);
6368
+ if (await pathExists(getSettingsPath(noExtPmRoot))) {
6369
+ emitSettingsReadWarnings((await readSettingsWithMetadata(noExtPmRoot)).warnings);
6370
+ }
6006
6371
  return null;
6007
6372
  }
6008
6373
  const pmRoot = resolvePmRoot(process.cwd(), globalOptions.path);
6374
+ const discoverySnapshot = await loadRuntimeExtensionDiscoverySnapshot(pmRoot);
6375
+ if (!discoverySnapshot) {
6376
+ return null;
6377
+ }
6378
+ emitSettingsReadWarnings(discoverySnapshot.settingsReadWarnings);
6379
+ const probe = {
6380
+ commandPath: getCommandPath(command),
6381
+ commandArgs: collectParsedActivationCommandArgs(command)
6382
+ };
6383
+ if (!discoveryNeedsActivationForProbe(discoverySnapshot.discovery, probe)) {
6384
+ emitExtensionSkippedProfile(globalOptions.profile, discoverySnapshot, probe);
6385
+ return null;
6386
+ }
6009
6387
  const snapshot = await loadRuntimeExtensionSnapshot(pmRoot);
6010
6388
  if (!snapshot) {
6011
6389
  return null;
@@ -6197,22 +6575,37 @@ function wrapProgramActionsForExtensionHandlers(rootProgram) {
6197
6575
  }
6198
6576
  async function registerDynamicExtensionCommandPaths(rootProgram, invocationArgv) {
6199
6577
  const bootstrapGlobalOptions = parseBootstrapGlobalOptions(invocationArgv);
6578
+ const pmRoot = resolvePmRoot(process.cwd(), bootstrapGlobalOptions.path);
6200
6579
  if (bootstrapGlobalOptions.noExtensions) {
6201
6580
  activeRuntimeExtensionCommandDescriptors = /* @__PURE__ */ new Map();
6202
6581
  setActiveExtensionServices({ overrides: [] });
6582
+ await maybeAttachCreateUpdatePolicyHelpText(rootProgram, pmRoot, invocationArgv, createEmptyExtensionRegistrationRegistry());
6583
+ return;
6584
+ }
6585
+ const discoverySnapshot = await loadRuntimeExtensionDiscoverySnapshot(pmRoot);
6586
+ const probe = buildBootstrapActivationProbe(invocationArgv);
6587
+ if (!discoverySnapshot) {
6588
+ activeRuntimeExtensionCommandDescriptors = /* @__PURE__ */ new Map();
6589
+ setActiveExtensionServices({ overrides: [] });
6590
+ return;
6591
+ }
6592
+ if (!discoveryNeedsActivationForProbe(discoverySnapshot.discovery, probe)) {
6593
+ activeRuntimeExtensionCommandDescriptors = /* @__PURE__ */ new Map();
6594
+ setActiveExtensionServices({ overrides: [] });
6595
+ await maybeAttachCreateUpdatePolicyHelpText(rootProgram, pmRoot, invocationArgv, createEmptyExtensionRegistrationRegistry(), discoverySnapshot.settings);
6596
+ emitExtensionSkippedProfile(bootstrapProfileEnabled(invocationArgv), discoverySnapshot, probe);
6203
6597
  return;
6204
6598
  }
6205
- const pmRoot = resolvePmRoot(process.cwd(), bootstrapGlobalOptions.path);
6206
6599
  const snapshot = await loadRuntimeExtensionSnapshot(pmRoot);
6207
6600
  if (!snapshot) {
6208
6601
  activeRuntimeExtensionCommandDescriptors = /* @__PURE__ */ new Map();
6209
6602
  setActiveExtensionServices({ overrides: [] });
6603
+ await maybeAttachCreateUpdatePolicyHelpText(rootProgram, pmRoot, invocationArgv, createEmptyExtensionRegistrationRegistry(), discoverySnapshot.settings);
6210
6604
  return;
6211
6605
  }
6212
6606
  setActiveExtensionServices(snapshot.services);
6213
6607
  activeRuntimeExtensionCommandDescriptors = new Map(snapshot.commandDescriptors);
6214
- const typeRegistry = resolveItemTypeRegistry(snapshot.settings, snapshot.registrations);
6215
- attachCreateUpdatePolicyHelpText(rootProgram, typeRegistry, invocationArgv);
6608
+ await maybeAttachCreateUpdatePolicyHelpText(rootProgram, pmRoot, invocationArgv, snapshot.registrations, snapshot.settings);
6216
6609
  const commandPaths = [.../* @__PURE__ */ new Set([...snapshot.commandHandlers, ...snapshot.commandDescriptors.keys()])].sort((left, right) => left.localeCompare(right));
6217
6610
  for (const commandPath of commandPaths) {
6218
6611
  const pathParts = commandPath.split(" ").filter((part) => part.length > 0);
@@ -6450,6 +6843,7 @@ var LIST_QUERY_COMMAND_NAMES = /* @__PURE__ */ new Set([
6450
6843
  var MUTATION_COMMAND_NAMES = /* @__PURE__ */ new Set([
6451
6844
  "append",
6452
6845
  "close",
6846
+ "close-many",
6453
6847
  "comments",
6454
6848
  "delete",
6455
6849
  "deps",
@@ -6480,6 +6874,14 @@ var OPERATION_COMMAND_NAMES = /* @__PURE__ */ new Set([
6480
6874
  "test-runs-worker",
6481
6875
  "validate"
6482
6876
  ]);
6877
+ var MUTATING_OPERATION_COMMAND_NAMES = /* @__PURE__ */ new Set([
6878
+ "claim",
6879
+ "close-task",
6880
+ "pause-task",
6881
+ "release",
6882
+ "start-task",
6883
+ "test"
6884
+ ]);
6483
6885
  var REGISTER_ALL_CORE_COMMAND_FAMILIES = {
6484
6886
  setup: true,
6485
6887
  listQuery: true,
@@ -6619,12 +7021,37 @@ function shouldRegisterRuntimeSchemaFlags(invocationArgv) {
6619
7021
  }
6620
7022
  return RUNTIME_SCHEMA_FLAG_BOOTSTRAP_COMMANDS.has(commandName);
6621
7023
  }
7024
+ function enforceExplicitRetryForFlagTypos(bootstrapInvocation) {
7025
+ const commandName = bootstrapInvocation.commandName;
7026
+ if (!commandName) {
7027
+ return;
7028
+ }
7029
+ const typoEvent = bootstrapInvocation.trace.find((entry) => entry.reason === "flag_typo");
7030
+ if (!typoEvent) {
7031
+ return;
7032
+ }
7033
+ const normalizedTokens = Array.isArray(typoEvent.to) ? typoEvent.to : [String(typoEvent.to ?? "")].filter((entry) => entry.length > 0);
7034
+ const normalizedDisplay = normalizedTokens.length > 0 ? normalizedTokens.join(" ") : "the canonical flag";
7035
+ const mutatingCommand = MUTATION_COMMAND_NAMES.has(commandName) || MUTATING_OPERATION_COMMAND_NAMES.has(commandName);
7036
+ const code = mutatingCommand ? "mutating_flag_typo_requires_retry" : "flag_typo_requires_retry";
7037
+ const commandScope = mutatingCommand ? "mutating option" : "option";
7038
+ throw new PmCliError(`Refusing to auto-correct ${commandScope} ${typoEvent.from} to ${normalizedDisplay}. Retry with the canonical flag so the command is explicit.`, EXIT_CODE.USAGE, {
7039
+ code,
7040
+ examples: [renderPmCommand(bootstrapInvocation.argv)],
7041
+ nextSteps: ["Retry the command with the canonical flag shown in examples."],
7042
+ recovery: {
7043
+ normalized_args: [...bootstrapInvocation.argv],
7044
+ suggested_retry: renderPmCommand(bootstrapInvocation.argv)
7045
+ }
7046
+ });
7047
+ }
6622
7048
  async function runPmCli(rawArgv = process.argv.slice(2)) {
6623
7049
  const bootstrapInvocation = normalizeBootstrapInvocation(rawArgv);
6624
7050
  const invocationArgv = bootstrapInvocation.argv;
6625
7051
  const invocationProcessArgv = [process.argv[0], process.argv[1], ...invocationArgv];
6626
7052
  const isBareInvocation = invocationArgv.length === 0;
6627
7053
  try {
7054
+ enforceExplicitRetryForFlagTypos(bootstrapInvocation);
6628
7055
  applyBootstrapPagerPolicy(invocationArgv);
6629
7056
  const registrationSelection = resolveCoreCommandRegistrationSelection(invocationArgv);
6630
7057
  await registerCoreCommandFamilies(program, registrationSelection);
@@ -6683,8 +7110,17 @@ async function runPmCli(rawArgv = process.argv.slice(2)) {
6683
7110
  };
6684
7111
  };
6685
7112
  if (!bootstrapGlobal.noExtensions) {
6686
- const bootstrapSnapshot = await loadRuntimeExtensionSnapshot(bootstrapPmRoot);
6687
- setActiveExtensionServices(bootstrapSnapshot?.services ?? { overrides: [] });
7113
+ const bootstrapProbe = buildBootstrapActivationProbe(invocationArgv);
7114
+ const discoverySnapshot = await loadRuntimeExtensionDiscoverySnapshot(bootstrapPmRoot);
7115
+ if (discoverySnapshot && discoveryNeedsActivationForProbe(discoverySnapshot.discovery, bootstrapProbe)) {
7116
+ const bootstrapSnapshot = await loadRuntimeExtensionSnapshot(bootstrapPmRoot);
7117
+ setActiveExtensionServices(bootstrapSnapshot?.services ?? { overrides: [] });
7118
+ } else {
7119
+ if (discoverySnapshot) {
7120
+ emitExtensionSkippedProfile(bootstrapProfileEnabled(invocationArgv), discoverySnapshot, bootstrapProbe);
7121
+ }
7122
+ setActiveExtensionServices({ overrides: [] });
7123
+ }
6688
7124
  }
6689
7125
  const numericExitCode = readThrownExitCode(error);
6690
7126
  if (error instanceof PmCliError || !isCommanderError(error) && typeof numericExitCode === "number" && Number.isFinite(numericExitCode)) {
@@ -6729,7 +7165,9 @@ async function runPmCli(rawArgv = process.argv.slice(2)) {
6729
7165
  command_resolution: commandResolution2,
6730
7166
  resolution_stage: "execute"
6731
7167
  });
6732
- sentryCaptureCliError(wrapThrownErrorForSentry(error, errorMessage));
7168
+ if (loggedHandledErrorToSentry) {
7169
+ sentryCaptureCliError(wrapThrownErrorForSentry(error, errorMessage));
7170
+ }
6733
7171
  if (jsonErrors) {
6734
7172
  printError(JSON.stringify(formatPmCliErrorForJson(errorMessage, exitCode, enrichedContext), null, 2));
6735
7173
  } else {